chiark / gitweb /
bus: explicitly ignore failure during error handling
[elogind.git] / src / libsystemd / sd-bus / test-bus-server.c
index e65811f0471cbd29b2e5e3c8984a327fd6aeaf9a..080d8eddb76ddc2fa4c939c13050cf6a5a3eefa7 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <assert.h>
 #include <stdlib.h>
 #include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
 
 #include "log.h"
 #include "util.h"
@@ -31,7 +28,6 @@
 
 #include "sd-bus.h"
 #include "bus-internal.h"
-#include "bus-message.h"
 #include "bus-util.h"
 
 struct context {
@@ -146,10 +142,8 @@ static int client(struct context *c) {
                         "/",
                         "org.freedesktop.systemd.test",
                         "Exit");
-        if (r < 0) {
-                log_error_errno(r, "Failed to allocate method call: %m");
-                return r;
-        }
+        if (r < 0)
+                return log_error_errno(r, "Failed to allocate method call: %m");
 
         r = sd_bus_call(bus, m, 0, &error, &reply);
         if (r < 0) {