diff --git a/debug/tst-sprintf-fortify-rdonly.c b/debug/tst-sprintf-fortify-rdonly.c index fafc8340ea..33a22f5d87 100644 --- a/debug/tst-sprintf-fortify-rdonly.c +++ b/debug/tst-sprintf-fortify-rdonly.c @@ -94,7 +94,7 @@ do_test (void) max_fd = (rl.rlim_cur < max_fd ? rl.rlim_cur : max_fd); rl.rlim_cur = max_fd; - if (setrlimit (RLIMIT_NOFILE, &rl) == 1) + if (setrlimit (RLIMIT_NOFILE, &rl) == -1) FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); /* Exhaust the file descriptor limit with temporary files. */ diff --git a/io/tst-closefrom.c b/io/tst-closefrom.c index 81011644fd..6dc3000207 100644 --- a/io/tst-closefrom.c +++ b/io/tst-closefrom.c @@ -103,7 +103,7 @@ closefrom_test_file_desc_limit (void) max_fd = (rl.rlim_cur < max_fd ? rl.rlim_cur : max_fd); rl.rlim_cur = max_fd; - if (setrlimit (RLIMIT_NOFILE, &rl) == 1) + if (setrlimit (RLIMIT_NOFILE, &rl) == -1) FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); } diff --git a/posix/tst-spawn3.c b/posix/tst-spawn3.c index 3d637e8de6..d17b6d2a06 100644 --- a/posix/tst-spawn3.c +++ b/posix/tst-spawn3.c @@ -62,7 +62,7 @@ do_test (void) max_fd = (rl.rlim_cur < max_fd ? rl.rlim_cur : max_fd); rl.rlim_cur = max_fd; - if (setrlimit (RLIMIT_NOFILE, &rl) == 1) + if (setrlimit (RLIMIT_NOFILE, &rl) == -1) FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); /* Exhauste the file descriptor limit with temporary files. */ diff --git a/support/support-open-dev-null-range.c b/support/support-open-dev-null-range.c index 812d579583..baf70b4118 100644 --- a/support/support-open-dev-null-range.c +++ b/support/support-open-dev-null-range.c @@ -33,7 +33,7 @@ increase_nofile (void) rl.rlim_cur += 128; - if (setrlimit (RLIMIT_NOFILE, &rl) == 1) + if (setrlimit (RLIMIT_NOFILE, &rl) == -1) FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); } diff --git a/support/tst-support-open-dev-null-range.c b/support/tst-support-open-dev-null-range.c index 6db20f0703..545e22242d 100644 --- a/support/tst-support-open-dev-null-range.c +++ b/support/tst-support-open-dev-null-range.c @@ -121,7 +121,7 @@ do_test (void) rl.rlim_cur = number_of_opened_files (); - if (setrlimit (RLIMIT_NOFILE, &rl) == 1) + if (setrlimit (RLIMIT_NOFILE, &rl) == -1) FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); }