sd-bus: it's not a user error to query the error contained in a bus message

It's an OK way to check whether a message contains an erro, let's not
consider this a loggable assertion event.
This commit is contained in:
Lennart Poettering
2015-08-27 12:54:35 +02:00
parent dce391e78f
commit f02b961582
+3 -1
View File
@@ -1023,7 +1023,9 @@ _public_ const char *sd_bus_message_get_sender(sd_bus_message *m) {
_public_ const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m) {
assert_return(m, NULL);
assert_return(sd_bus_error_is_set(&m->error), NULL);
if (!sd_bus_error_is_set(&m->error))
return NULL;
return &m->error;
}