From 608f52ebbf287dc575d82371b06b138030e79000 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 27 Mar 2017 14:52:24 -0700 Subject: [PATCH] app/iscsi_top: use MAP_FAILED for mmap() check instead of NULL Signed-off-by: Jim Harris Change-Id: I69214fa90e9e7c6e789e04c0b5d4540a4a7d4b7f --- app/iscsi_top/iscsi_top.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/iscsi_top/iscsi_top.cpp b/app/iscsi_top/iscsi_top.cpp index ba78a700f..e298f23a4 100644 --- a/app/iscsi_top/iscsi_top.cpp +++ b/app/iscsi_top/iscsi_top.cpp @@ -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); }