diff options
-rw-r--r-- | src/basic/parse-util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index 718357e290..5b4e94c134 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -20,7 +20,8 @@ #include "string-util.h" int parse_boolean(const char *v) { - assert(v); + if (!v) + return -EINVAL; if (streq(v, "1") || strcaseeq(v, "yes") || strcaseeq(v, "y") || strcaseeq(v, "true") || strcaseeq(v, "t") || strcaseeq(v, "on")) return 1; |