From: Lennart Poettering Date: Thu, 27 Aug 2015 10:54:35 +0000 (+0200) Subject: sd-bus: it's not a user error to query the error contained in a bus message X-Git-Tag: v226~89^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f02b961582505448b59e68f08413e8b6bf7c2df5;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index a212f0b..bc531c2 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -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; }