mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
sd-event: do not use assert_return for something that is not an error
It's totally OK for description to be unset, so let's not log about this even at debug level.
This commit is contained in:
parent
a6da77b71b
commit
7d92a1a490
@ -1887,9 +1887,11 @@ _public_ int sd_event_source_set_description(sd_event_source *s, const char *des
|
||||
_public_ int sd_event_source_get_description(sd_event_source *s, const char **description) {
|
||||
assert_return(s, -EINVAL);
|
||||
assert_return(description, -EINVAL);
|
||||
assert_return(s->description, -ENXIO);
|
||||
assert_return(!event_pid_changed(s->event), -ECHILD);
|
||||
|
||||
if (!s->description)
|
||||
return -ENXIO;
|
||||
|
||||
*description = s->description;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user