diff --git a/utils/conntest/rhd_conntest.c b/utils/conntest/rhd_conntest.c index 1bba608..dde8b54 100644 --- a/utils/conntest/rhd_conntest.c +++ b/utils/conntest/rhd_conntest.c @@ -3006,7 +3006,7 @@ main(int argc, char *argv[]) io = MapBar(device, rhdDevice->bar, devMem); saved_errno = errno; close (devMem); - if (!io) { + if (io == (void *) -1) { fprintf(stderr, "Unable to map IO memory: %s.\n", strerror(saved_errno)); return 1; diff --git a/utils/conntest/rhd_dump.c b/utils/conntest/rhd_dump.c index 2319d6c..ceb6ed4 100644 --- a/utils/conntest/rhd_dump.c +++ b/utils/conntest/rhd_dump.c @@ -593,7 +593,7 @@ main(int argc, char *argv[]) io = MapBar(device, rhdDevice->bar, devMem); saved_errno = errno; close (devMem); - if (!io) { + if (io == (void *) -1) { fprintf(stderr, "Unable to map IO memory: %s.\n", strerror(saved_errno)); return 1;