Fixes for issues Coverity has reported (VPP-972)
[vpp.git] / src / vppinfra / linux / mem.c
index 665ddf6..df46763 100644 (file)
@@ -49,7 +49,7 @@ int
 clib_mem_vm_get_log2_page_size (int fd)
 {
   struct stat st = { 0 };
-  if (fstat (fd, &st))
+  if (fstat (fd, &st) == -1)
     return 0;
   return min_log2 (st.st_blksize);
 }