summaryrefslogtreecommitdiff
path: root/src/shared/uid-range.c
diff options
context:
space:
mode:
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;