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:
parent
d35443d460
commit
608f52ebbf
@ -167,7 +167,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
history_ptr = mmap(NULL, sizeof(*histories), PROT_READ, MAP_SHARED, history_fd, 0);
|
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");
|
fprintf(stderr, "Unable to mmap history shm\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user