summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-17 00:00:32 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-17 00:52:10 +0100
commit4a0b58c4a30ecaa61202f845ed86f75b36370cd0 (patch)
tree1e08b9d596dfb8b4fe3af50315ecf37a7046bb47 /src/libsystemd
parent357bc17975e3a60a64c46f56b5330747c67705b2 (diff)
tree-wide: use right cast macros for UIDs, GIDs and PIDs
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-event/sd-event.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index ee4886700e..700ac691b5 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -34,6 +34,7 @@
#include "macro.h"
#include "missing.h"
#include "prioq.h"
+#include "process-util.h"
#include "set.h"
#include "signal-util.h"
#include "string-util.h"
@@ -808,7 +809,7 @@ static void source_disconnect(sd_event_source *s) {
s->event->n_enabled_child_sources--;
}
- (void) hashmap_remove(s->event->child_sources, INT_TO_PTR(s->child.pid));
+ (void) hashmap_remove(s->event->child_sources, PID_TO_PTR(s->child.pid));
event_gc_signal_data(s->event, &s->priority, SIGCHLD);
}
@@ -1188,7 +1189,7 @@ _public_ int sd_event_add_child(
if (r < 0)
return r;
- if (hashmap_contains(e->child_sources, INT_TO_PTR(pid)))
+ if (hashmap_contains(e->child_sources, PID_TO_PTR(pid)))
return -EBUSY;
s = source_new(e, !ret, SOURCE_CHILD);
@@ -1201,7 +1202,7 @@ _public_ int sd_event_add_child(
s->userdata = userdata;
s->enabled = SD_EVENT_ONESHOT;
- r = hashmap_put(e->child_sources, INT_TO_PTR(pid), s);
+ r = hashmap_put(e->child_sources, PID_TO_PTR(pid), s);
if (r < 0) {
source_free(s);
return r;