summaryrefslogtreecommitdiff
path: root/src/basic/log.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-30 14:16:40 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-30 15:25:23 +0200
commit737af7347c03a6ed2dfeea76647e9c1ca5b05a64 (patch)
tree1b9d077b58552a15bea987e33566718cf0d091fd /src/basic/log.c
parentd8fc6a000fe21b0c1ba27fbfed8b42d00b349a4b (diff)
log: properly return -EINVAL from log_set_max_level_from_string()
If we just return the value we got from log_level_from_string() on failure we'll return -1, which is not a proper error code. log_set_target_from_string() did get this right already, hence let's fix this here too.
Diffstat (limited to 'src/basic/log.c')
-rw-r--r--src/basic/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index 38f42b3a6e..e6d7d15182 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -922,7 +922,7 @@ int log_set_max_level_from_string(const char *e) {
t = log_level_from_string(e);
if (t < 0)
- return t;
+ return -EINVAL;
log_set_max_level(t);
return 0;