tests/test-mmap.c: Check mmap() return value before using it
commit420b6c317de87890e06225de6e2f8af7bf714df0
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 14 Apr 2011 13:11:56 +0000 (14 14:11 +0100)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Thu, 14 Apr 2011 15:31:47 +0000 (14 17:31 +0200)
tree3cbbae13610ae4451a7020ebe945affd6b51d839
parent4d9ad7f793605abd9806fc932b3e04e028894565
tests/test-mmap.c: Check mmap() return value before using it

Correct the position of a "stop if MAP_FAILED" check in the mmap()
tests, so that if mmap() does fail we print a failure message
rather than segfaulting inside memcpy().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
tests/test-mmap.c