config: make boolean value more flexible: on, true and yes (fix
@@ -324,8 +324,9 @@ static int set_log_level(struct flb_config *config, char *v_str)
static inline int atobool(char*v)
{
- return (strncasecmp("true", v, 256) == 0 ||
- strncasecmp("on", v, 256) == 0)
+ return (strcasecmp("true", v) == 0 ||
+ strcasecmp("on", v) == 0 ||
+ strcasecmp("yes", v) == 0)
? FLB_TRUE
: FLB_FALSE;
}
