summaryrefslogtreecommitdiff
path: root/src/machine/machined.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-05 00:52:46 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-05 01:13:05 +0100
commita658cafa98ab55ea948c29bc87eb3945d515fb41 (patch)
tree97787f6dc7126c2a2f8fab40da7b839928d22067 /src/machine/machined.c
parent6ee69bab116f6691dbd04debba5d47dc97d2a6cc (diff)
machined: simplifications
Diffstat (limited to 'src/machine/machined.c')
-rw-r--r--src/machine/machined.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c
index 63915519c1..25de0d5d46 100644
--- a/src/machine/machined.c
+++ b/src/machine/machined.c
@@ -47,13 +47,13 @@ Manager *manager_new(void) {
m->machines = hashmap_new(string_hash_func, string_compare_func);
m->machine_units = hashmap_new(string_hash_func, string_compare_func);
- r = sd_event_new(&m->event);
- if (r < 0) {
+ if (!m->machines || !m->machine_units) {
manager_free(m);
return NULL;
}
- if (!m->machines || !m->machine_units) {
+ r = sd_event_new(&m->event);
+ if (r < 0) {
manager_free(m);
return NULL;
}
@@ -284,7 +284,7 @@ void manager_gc(Manager *m, bool drop_not_started) {
LIST_REMOVE(gc_queue, m->machine_gc_queue, machine);
machine->in_gc_queue = false;
- if (machine_check_gc(machine, drop_not_started) == 0) {
+ if (!machine_check_gc(machine, drop_not_started)) {
machine_stop(machine);
machine_free(machine);
}