X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Frun%2Frun.c;fp=src%2Frun%2Frun.c;h=22abb0ebbbf5ff7167b9be3b3fab93120f6546af;hp=b183e4e616ac3ff07f90e619846938dcfdcd8965;hb=aa1aad74e6b14730542c26a7c17c5d06c62b6089;hpb=3dd0bbeb153040ca59899f770e5b0714947ea3cb diff --git a/src/run/run.c b/src/run/run.c index b183e4e61..22abb0ebb 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -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) {