summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-cgroup-util.c2
-rw-r--r--src/test/test-conf-files.c2
-rw-r--r--src/test/test-uid-range.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index 68c526ae82..58eb744277 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -141,7 +141,7 @@ static void test_proc(void) {
FOREACH_DIRENT(de, d, break) {
_cleanup_free_ char *path = NULL, *path_shifted = NULL, *session = NULL, *unit = NULL, *user_unit = NULL, *machine = NULL, *slice = NULL;
pid_t pid;
- uid_t uid = (uid_t) -1;
+ uid_t uid = UID_INVALID;
if (de->d_type != DT_DIR &&
de->d_type != DT_UNKNOWN)
diff --git a/src/test/test-conf-files.c b/src/test/test-conf-files.c
index e801c5989e..945ada59a3 100644
--- a/src/test/test-conf-files.c
+++ b/src/test/test-conf-files.c
@@ -36,7 +36,7 @@ static void setup_test_dir(char *tmp_dir, const char *files, ...) {
va_start(ap, files);
while (files != NULL) {
_cleanup_free_ char *path = strappend(tmp_dir, files);
- assert_se(touch_file(path, true, (usec_t) -1, (uid_t) -1, (gid_t) -1, 0) == 0);
+ assert_se(touch_file(path, true, (usec_t) -1, UID_INVALID, GID_INVALID, 0) == 0);
files = va_arg(ap, const char *);
}
va_end(ap);
diff --git a/src/test/test-uid-range.c b/src/test/test-uid-range.c
index 06b4d43426..bc5baa2fcb 100644
--- a/src/test/test-uid-range.c
+++ b/src/test/test-uid-range.c
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
assert_se(uid_range_contains(p, n, 999));
assert_se(!uid_range_contains(p, n, 1000));
- search = (uid_t) -1;
+ search = UID_INVALID;
assert_se(uid_range_next_lower(p, n, &search));
assert_se(search == 999);
assert_se(uid_range_next_lower(p, n, &search));