summaryrefslogtreecommitdiff
path: root/src/login/logind-user.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-09 16:25:47 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-09 18:35:36 +0100
commit8cb4ab0058e51f1fba93683d145ef95f97c2fa86 (patch)
tree022bbd937efd224d8de1e2c5db66331a6149ed74 /src/login/logind-user.c
parent309a29dfd24f4175de334ca1593e3fe2436ab082 (diff)
logind: unify how we cast between uid_t and pointers for hashmap keys
Diffstat (limited to 'src/login/logind-user.c')
-rw-r--r--src/login/logind-user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 9ff1302663..49c373b50d 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -56,7 +56,7 @@ User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) {
if (asprintf(&u->state_file, "/run/systemd/users/"UID_FMT, uid) < 0)
goto fail;
- if (hashmap_put(m->users, ULONG_TO_PTR((unsigned long) uid), u) < 0)
+ if (hashmap_put(m->users, UID_TO_PTR(uid), u) < 0)
goto fail;
u->manager = m;
@@ -97,7 +97,7 @@ void user_free(User *u) {
free(u->runtime_path);
- hashmap_remove(u->manager->users, ULONG_TO_PTR((unsigned long) u->uid));
+ hashmap_remove(u->manager->users, UID_TO_PTR(u->uid));
free(u->name);
free(u->state_file);