summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-30 14:16:40 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-29 10:45:10 +0200
commit02313252e36e309776829312ab87e9a489e6572f (patch)
tree4087aacb2ee81cbf710300bcd155462be9d8335f /src
parent1d883c59d17d938fc4307be44e5f654bd62fdeb3 (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')
-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 921c952f8..69977f15d 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -942,7 +942,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;