summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-27 12:54:35 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-27 12:54:35 +0200
commitf02b961582505448b59e68f08413e8b6bf7c2df5 (patch)
tree8b36ed8f09b5d2747a09c8d72342cbaca74eb182 /src/libsystemd
parentdce391e78f5d8d5f4feb3eb6a15436de12dacf46 (diff)
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.
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index a212f0b398..bc531c2e3a 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;
}