diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-24 18:16:44 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-04-27 18:13:51 +0200 |
commit | c8f054361b653d7cd8bf8f01ce29b8ba11e5939e (patch) | |
tree | 97701dd3d13a05ec8e6363147f2c032ce9bb4151 /src/machine | |
parent | 90b8a009a7a532b4a60ecb114466b1704156cf53 (diff) | |
download | systemd-c8f054361b653d7cd8bf8f01ce29b8ba11e5939e.tar.gz |
machined: minor code cleanups, such as voidifying calls
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machine.c | 1 | ||||
-rw-r--r-- | src/machine/machined.c | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c index 06dda19c43..008bbbc3f4 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -236,7 +236,6 @@ static void machine_unlink(Machine *m) { assert(m); if (m->unit) { - char *sl; sl = strjoina("/run/systemd/machines/unit:", m->unit); diff --git a/src/machine/machined.c b/src/machine/machined.c index 3577c809a4..41b4cdad6d 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -67,7 +67,8 @@ static int manager_new(Manager **ret) { static Manager* manager_unref(Manager *m) { Machine *machine; - assert(m); + if (!m) + return NULL; while (m->operations) operation_free(m->operations); @@ -387,14 +388,18 @@ int main(int argc, char *argv[]) { log_debug("systemd-machined running as pid "PID_FMT, getpid_cached()); - sd_notify(false, - "READY=1\n" - "STATUS=Processing requests..."); + (void) sd_notify(false, + "READY=1\n" + "STATUS=Processing requests..."); r = manager_run(m); log_debug("systemd-machined stopped as pid "PID_FMT, getpid_cached()); + (void) sd_notify(false, + "STOPPING=1\n" + "STATUS=Shutting down..."); + finish: return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } |