about summary refs log tree commit diff
path: root/posix/tst-nice.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/tst-nice.c')
-rw-r--r--posix/tst-nice.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/posix/tst-nice.c b/posix/tst-nice.c
index fe9888b3f6..59cf953e27 100644
--- a/posix/tst-nice.c
+++ b/posix/tst-nice.c
@@ -58,8 +58,7 @@ do_test (void)
 
   /* BZ #18086. Make sure we don't reset errno.  */
   errno = EBADF;
-  nice (0);
-  if (errno != EBADF)
+  if (nice (0) == -1 || errno != EBADF)
     {
       printf ("FAIL: errno = %i, but wanted EBADF (%i)\n", errno, EBADF);
       return 1;