diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2015-04-14 18:52:25 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2015-04-14 18:52:25 +0300 |
commit | 4525c294ea4cfc9f6401565fd8e8c09c07fb6755 (patch) | |
tree | c3b4be312504b71033f179589f5563da7bd384d2 | |
parent | 6c8fb7f8e972482af94fa26e1e08812932250023 (diff) | |
download | ConsoleKit2-4525c294ea4cfc9f6401565fd8e8c09c07fb6755.tar.gz |
unix_user should be cast to a uid_t
(int)unix_user should be (uid_t) because it may be (un)signed.
POSIX is vague about the datatype
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_12
-rw-r--r-- | src/ck-session-leader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ck-session-leader.c b/src/ck-session-leader.c index 37aabd0..2b392b6 100644 --- a/src/ck-session-leader.c +++ b/src/ck-session-leader.c @@ -235,7 +235,7 @@ parse_output (CkSessionLeader *leader, if (unix_user < 0) continue; - element = g_variant_new (variant_type, (int)unix_user); + element = g_variant_new (variant_type, (uid_t)unix_user); break; default: g_warning ("ck-session-leader unsupported type"); |