New upstream version 16.11.5
[deb_dpdk.git] / lib / librte_eal / bsdapp / eal / eal_memory.c
index 3614da8..248312d 100644 (file)
@@ -150,7 +150,7 @@ rte_eal_hugepage_attach(void)
        /* Map the shared hugepage_info into the process address spaces */
        hpi = mmap(NULL, sizeof(struct hugepage_info), PROT_READ, MAP_PRIVATE,
                        fd_hugepage_info, 0);
-       if (hpi == NULL) {
+       if (hpi == MAP_FAILED) {
                RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path());
                goto error;
        }