aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/physmem.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-23 22:54:40 +0200
committerDamjan Marion <dmarion@me.com>2018-10-23 22:14:04 +0000
commit8e8d3c8c118a9411b1f8959a0aa545fd7bff5406 (patch)
tree0a61ceb8fa47af759a47b2165fc83930d275cfef /src/vlib/physmem.c
parent6cfd414e4ce1705ad67923c00b48682a474941cb (diff)
physmem coverity issues
Change-Id: Ie9ff9b751190632dfc4576e5cbb1987a4142af5e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/physmem.c')
-rwxr-xr-xsrc/vlib/physmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/physmem.c b/src/vlib/physmem.c
index e2d88922f56..2599bce944d 100755
--- a/src/vlib/physmem.c
+++ b/src/vlib/physmem.c
@@ -39,7 +39,7 @@ vlib_physmem_shared_map_create (vlib_main_t * vm, char *name, uword size,
clib_pmalloc_arena_t *a;
clib_error_t *error = 0;
void *va;
- int i;
+ uword i;
va = clib_pmalloc_create_shared_arena (pm, name, size, numa_node);
@@ -87,7 +87,7 @@ vlib_physmem_init (vlib_main_t * vm)
/* check if pagemap is accessible */
pt = clib_mem_vm_get_paddr (&pt, min_log2 (sysconf (_SC_PAGESIZE)), 1);
- if (pt[0])
+ if (pt && pt[0])
vpm->flags |= VLIB_PHYSMEM_MAIN_F_HAVE_PAGEMAP;
vec_free (pt);