chiark / gitweb /
run: uninitialized variable
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 25 Dec 2014 15:52:38 +0000 (10:52 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 25 Dec 2014 15:57:37 +0000 (10:57 -0500)
src/run/run.c

index b183e4e..22abb0e 100644 (file)
@@ -423,16 +423,12 @@ static int transient_cgroup_set_properties(sd_bus_message *m) {
 }
 
 static int transient_kill_set_properties(sd_bus_message *m) {
-        int r;
         assert(m);
 
-        if (arg_send_sighup) {
-                r = sd_bus_message_append(m, "(sv)", "SendSIGHUP", "b", arg_send_sighup);
-                if (r < 0)
-                        return r;
-        }
-
-        return r;
+        if (arg_send_sighup)
+                return sd_bus_message_append(m, "(sv)", "SendSIGHUP", "b", arg_send_sighup);
+        else
+                return 0;
 }
 
 static int transient_service_set_properties(sd_bus_message *m, char **argv, const char *pty_path) {