summaryrefslogtreecommitdiff
path: root/daemon/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/misc.c')
-rw-r--r--daemon/misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/daemon/misc.c b/daemon/misc.c
index 9dba389..15344ce 100644
--- a/daemon/misc.c
+++ b/daemon/misc.c
@@ -170,15 +170,15 @@ void ha_unlock(pthread_mutex_t* mtx)
int ha_confbool(const char* name, const char* conf, int* value)
{
- ASSERT(name && conf && value);
+ ASSERT(name && value);
- if(value == NULL ||
- value[0] == 0 ||
+ if(conf == NULL ||
+ conf[0] == 0 ||
strcasecmp(conf, "0") == 0 ||
strcasecmp(conf, "no") == 0 ||
strcasecmp(conf, "false") == 0 ||
strcasecmp(conf, "f") == 0 ||
- strcasecmp(conf, "off"))
+ strcasecmp(conf, "off") == 0)
{
*value = 0;
return HA_OK;
@@ -188,7 +188,7 @@ int ha_confbool(const char* name, const char* conf, int* value)
strcasecmp(conf, "yes") == 0 ||
strcasecmp(conf, "true") == 0 ||
strcasecmp(conf, "t") == 0 ||
- strcasecmp(conf, "on"))
+ strcasecmp(conf, "on") == 0)
{
*value = 1;
return HA_OK;