From f02b961582505448b59e68f08413e8b6bf7c2df5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 27 Aug 2015 12:54:35 +0200 Subject: 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. --- src/libsystemd/sd-bus/bus-message.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsystemd') 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; } -- cgit v1.2.3-54-g00ecf