summaryrefslogtreecommitdiff
path: root/src/basic
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/basic
parent357bc17975e3a60a64c46f56b5330747c67705b2 (diff)
tree-wide: use right cast macros for UIDs, GIDs and PIDs
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 3e4ec42a28..58617b354a 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -206,7 +206,7 @@ static int do_execute(char **directories, usec_t timeout, char *argv[]) {
log_debug("Spawned %s as " PID_FMT ".", path, pid);
- r = hashmap_put(pids, UINT_TO_PTR(pid), path);
+ r = hashmap_put(pids, PID_TO_PTR(pid), path);
if (r < 0)
return log_oom();
path = NULL;
@@ -224,10 +224,10 @@ static int do_execute(char **directories, usec_t timeout, char *argv[]) {
_cleanup_free_ char *path = NULL;
pid_t pid;
- pid = PTR_TO_UINT(hashmap_first_key(pids));
+ pid = PTR_TO_PID(hashmap_first_key(pids));
assert(pid > 0);
- path = hashmap_remove(pids, UINT_TO_PTR(pid));
+ path = hashmap_remove(pids, PID_TO_PTR(pid));
assert(path);
wait_for_terminate_and_warn(path, pid, true);