machined: minor code cleanups, such as voidifying calls
This commit is contained in:
parent
90b8a009a7
commit
c8f054361b
|
@ -236,7 +236,6 @@ static void machine_unlink(Machine *m) {
|
||||||
assert(m);
|
assert(m);
|
||||||
|
|
||||||
if (m->unit) {
|
if (m->unit) {
|
||||||
|
|
||||||
char *sl;
|
char *sl;
|
||||||
|
|
||||||
sl = strjoina("/run/systemd/machines/unit:", m->unit);
|
sl = strjoina("/run/systemd/machines/unit:", m->unit);
|
||||||
|
|
|
@ -67,7 +67,8 @@ static int manager_new(Manager **ret) {
|
||||||
static Manager* manager_unref(Manager *m) {
|
static Manager* manager_unref(Manager *m) {
|
||||||
Machine *machine;
|
Machine *machine;
|
||||||
|
|
||||||
assert(m);
|
if (!m)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
while (m->operations)
|
while (m->operations)
|
||||||
operation_free(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());
|
log_debug("systemd-machined running as pid "PID_FMT, getpid_cached());
|
||||||
|
|
||||||
sd_notify(false,
|
(void) sd_notify(false,
|
||||||
"READY=1\n"
|
"READY=1\n"
|
||||||
"STATUS=Processing requests...");
|
"STATUS=Processing requests...");
|
||||||
|
|
||||||
r = manager_run(m);
|
r = manager_run(m);
|
||||||
|
|
||||||
log_debug("systemd-machined stopped as pid "PID_FMT, getpid_cached());
|
log_debug("systemd-machined stopped as pid "PID_FMT, getpid_cached());
|
||||||
|
|
||||||
|
(void) sd_notify(false,
|
||||||
|
"STOPPING=1\n"
|
||||||
|
"STATUS=Shutting down...");
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue