machined: minor code cleanups, such as voidifying calls

This commit is contained in:
Lennart Poettering 2018-04-24 18:16:44 +02:00
parent 90b8a009a7
commit c8f054361b
2 changed files with 9 additions and 5 deletions

View File

@ -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);

View File

@ -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;
}