mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
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.
This commit is contained in:
parent
d8fc6a000f
commit
737af7347c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user