Correct checking for mmap failure.
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 31 Oct 2012 23:23:09 +0000 (00:23 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 31 Oct 2012 23:23:09 +0000 (00:23 +0100)
ChangeLog
rt/tst-shm.c

index 6992adce803d81137420d07d6648ad93df434e2a..1296ee6d874aabb6e68ee8e928ffe1b7287bc1d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-31  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * rt/tst-shm.c (worker): Correct checking for mmap failure.
+
 2012-10-31  Andreas Schwab  <schwab@linux-m68k.org>
 
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist:
index 92593bd2739452be9d54b18ee39cda299f3d6b89..457b075a385cea18f65931758a75a44d4c31024f 100644 (file)
@@ -73,7 +73,7 @@ worker (int write_now)
     error (EXIT_FAILURE, 0, "size incorrect");
 
   mem = mmap (NULL, 4000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-  if (mem == NULL)
+  if (mem == MAP_FAILED)
     error (EXIT_FAILURE, 0, "mmap failed");
 
   ts.tv_sec = 0;