summaryrefslogtreecommitdiff
path: root/src/shared/uid-range.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 20:51:01 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 20:55:04 +0100
commitfed1e721fd0c81e60c77120539f34e16c2585634 (patch)
treea0bb21b49530bc896dcd2c540a582e324c6d7785 /src/shared/uid-range.c
parent36afca67b67984520c5c9a6ce14af51a68c7c8cf (diff)
treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1
Diffstat (limited to 'src/shared/uid-range.c')
-rw-r--r--src/shared/uid-range.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
index 74c3be4a13..4794ff45bb 100644
--- a/src/shared/uid-range.c
+++ b/src/shared/uid-range.c
@@ -161,7 +161,7 @@ int uid_range_add_str(UidRange **p, unsigned *n, const char *s) {
}
int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid) {
- uid_t closest = (uid_t) -1, candidate;
+ uid_t closest = UID_INVALID, candidate;
unsigned i;
assert(p);
@@ -184,7 +184,7 @@ int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid) {
closest = end;
}
- if (closest == (uid_t) -1)
+ if (closest == UID_INVALID)
return -EBUSY;
*uid = closest;