resize_hugefile() returns either 0 (which indicates success) or -1
(which indicates failure). We failed to check the success as we
use --single-file-segments option.
Fixes: 2a04139f66b4 ("eal: add single file segments option")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
        if (internal_config.single_file_segments) {
                map_offset = seg_idx * alloc_sz;
                ret = resize_hugefile(fd, map_offset, alloc_sz, true);
-               if (ret < 1)
+               if (ret < 0)
                        goto resized;
        } else {
                map_offset = 0;