From cbc818d0ee66065f3942beffdca82986615aa19a Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 1 Nov 2012 00:23:09 +0100 Subject: Correct checking for mmap failure. --- rt/tst-shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rt') diff --git a/rt/tst-shm.c b/rt/tst-shm.c index 92593bd273..457b075a38 100644 --- a/rt/tst-shm.c +++ b/rt/tst-shm.c @@ -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; -- cgit 1.4.1