summaryrefslogtreecommitdiff
path: root/src/login/logind-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r--src/login/logind-dbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 3ff6cd398f..bc985a3754 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -92,7 +92,7 @@ int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid,
return r;
}
- user = hashmap_get(m->users, ULONG_TO_PTR((unsigned long) uid));
+ user = hashmap_get(m->users, UID_TO_PTR(uid));
if (!user)
return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_USER, "No user "UID_FMT" known or logged in", uid);
@@ -1157,7 +1157,7 @@ static int method_set_user_linger(sd_bus *bus, sd_bus_message *message, void *us
if (r < 0 && errno != ENOENT)
return -errno;
- u = hashmap_get(m->users, ULONG_TO_PTR((unsigned long) uid));
+ u = hashmap_get(m->users, UID_TO_PTR(uid));
if (u)
user_add_to_gc_queue(u);
}