summaryrefslogtreecommitdiff
path: root/src/sd-login.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/sd-login.c
parent034a2a52ac0ec83e0229941d635d310b23eb04df (diff)
util: user parse_uid() wherever applicable
Diffstat (limited to 'src/sd-login.c')
-rw-r--r--src/sd-login.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sd-login.c b/src/sd-login.c
index 6dfc2d086e..b7ae870af4 100644
--- a/src/sd-login.c
+++ b/src/sd-login.c
@@ -349,14 +349,10 @@ _public_ int sd_session_get_uid(const char *session, uid_t *uid) {
if (!s)
return -EIO;
- r = safe_atolu(s, &ul);
+ r = parse_uid(s, uid);
free(s);
- if (r < 0)
- return r;
-
- *uid = (uid_t) ul;
- return 0;
+ return r;
}
_public_ int sd_session_get_seat(const char *session, char **seat) {