summaryrefslogtreecommitdiff
path: root/src/logind.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-23 00:47:17 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-23 00:47:17 +0200
commitddd88763921a1534081ed28e36f6712a85449005 (patch)
treef027ce791a7525a75acb5381f97a81279d42ede4 /src/logind.c
parent034a2a52ac0ec83e0229941d635d310b23eb04df (diff)
util: user parse_uid() wherever applicable
Diffstat (limited to 'src/logind.c')
-rw-r--r--src/logind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logind.c b/src/logind.c
index f96ace2315..a081501a8c 100644
--- a/src/logind.c
+++ b/src/logind.c
@@ -509,19 +509,19 @@ int manager_enumerate_users(Manager *m) {
}
while ((de = readdir(d))) {
- unsigned long ul;
+ uid_t uid;
User *u;
if (!dirent_is_file(de))
continue;
- k = safe_atolu(de->d_name, &ul);
+ k = parse_uid(de->d_name, &uid);
if (k < 0) {
log_error("Failed to parse file name %s: %s", de->d_name, strerror(-k));
continue;
}
- u = hashmap_get(m->users, ULONG_TO_PTR(ul));
+ u = hashmap_get(m->users, ULONG_TO_PTR(uid));
if (!u) {
unlinkat(dirfd(d), de->d_name, 0);
continue;