mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
Correct checking for mmap failure.
This commit is contained in:
parent
5a03cb1e85
commit
cbc818d0ee
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user