diff options
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machine.c | 7 | ||||
-rw-r--r-- | src/machine/machined-dbus.c | 2 | ||||
-rw-r--r-- | src/machine/test-machine-tables.c | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c index 196bc4b8f4..6b1fae2769 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -29,6 +29,7 @@ #include "bus-error.h" #include "bus-util.h" #include "escape.h" +#include "extract-word.h" #include "fd-util.h" #include "fileio.h" #include "formats-util.h" @@ -37,12 +38,12 @@ #include "machine.h" #include "mkdir.h" #include "parse-util.h" +#include "process-util.h" #include "special.h" #include "string-table.h" #include "terminal-util.h" #include "unit-name.h" #include "util.h" -#include "extract-word.h" Machine* machine_new(Manager *manager, MachineClass class, const char *name) { Machine *m; @@ -105,7 +106,7 @@ void machine_free(Machine *m) { m->manager->host_machine = NULL; if (m->leader > 0) - (void) hashmap_remove_value(m->manager->machine_leaders, UINT_TO_PTR(m->leader), m); + (void) hashmap_remove_value(m->manager->machine_leaders, PID_TO_PTR(m->leader), m); sd_bus_message_unref(m->create_message); @@ -401,7 +402,7 @@ int machine_start(Machine *m, sd_bus_message *properties, sd_bus_error *error) { if (m->started) return 0; - r = hashmap_put(m->manager->machine_leaders, UINT_TO_PTR(m->leader), m); + r = hashmap_put(m->manager->machine_leaders, PID_TO_PTR(m->leader), m); if (r < 0) return r; diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 4ec6baaa1f..961767c4a9 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -1508,7 +1508,7 @@ int manager_get_machine_by_pid(Manager *m, pid_t pid, Machine **machine) { assert(pid >= 1); assert(machine); - mm = hashmap_get(m->machine_leaders, UINT_TO_PTR(pid)); + mm = hashmap_get(m->machine_leaders, PID_TO_PTR(pid)); if (!mm) { _cleanup_free_ char *unit = NULL; diff --git a/src/machine/test-machine-tables.c b/src/machine/test-machine-tables.c index 4aae426050..f851a4d37d 100644 --- a/src/machine/test-machine-tables.c +++ b/src/machine/test-machine-tables.c @@ -18,7 +18,6 @@ ***/ #include "machine.h" - #include "test-tables.h" int main(int argc, char **argv) { |