summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/linux')
-rw-r--r--src/vppinfra/linux/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 665ddf6194f..df46763ab2c 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -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);
}