utils: on boolean lookup, handle error
@@ -432,10 +432,15 @@ int flb_utils_bool(const char *val)
strcasecmp(val, "yes") == 0) {
return FLB_TRUE;
}
-
+ else if (strcasecmp(val, "false") == 0 ||
+ strcasecmp(val, "off") == 0 ||
+ strcasecmp(val, "no") == 0) {
return FLB_FALSE;
}
+ return -1;
+}
+
/* Convert a 'string' time seconds.nanoseconds to int and long values */
int flb_utils_time_split(const char *time, int *sec, long *nsec)
{
