app/iscsi_top: use MAP_FAILED for mmap() check instead of NULL

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I69214fa90e9e7c6e789e04c0b5d4540a4a7d4b7f
This commit is contained in:
Jim Harris 2017-03-27 14:52:24 -07:00
parent d35443d460
commit 608f52ebbf

View File

@ -167,7 +167,7 @@ int main(int argc, char **argv)
}
history_ptr = mmap(NULL, sizeof(*histories), PROT_READ, MAP_SHARED, history_fd, 0);
if (history_ptr == NULL) {
if (history_ptr == MAP_FAILED) {
fprintf(stderr, "Unable to mmap history shm\n");
exit(1);
}