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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user