svm: fix coverity warning
Type: fix
Change-Id: I6c6255e66dd4cd0e4174b2a1658a3b8be40f0f7a
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index d2788e8..c5511d9 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -269,7 +269,7 @@
sh->ssvm_va = pointer_to_uword (sh);
sh->type = SSVM_SEGMENT_MEMFD;
- page_size = 1 << log2_page_size;
+ page_size = 1ULL << log2_page_size;
sh->heap = clib_mem_create_heap (((u8 *) sh) + page_size,
memfd->ssvm_size - page_size,
1 /* locked */ , "ssvm server memfd");
@@ -371,7 +371,7 @@
return SSVM_API_ERROR_CREATE_FAILURE;
}
- page_size = 1 << log2_page_size;
+ page_size = 1ULL << log2_page_size;
rnd_size = clib_max (ssvm->ssvm_size + (page_size - 1), ssvm->ssvm_size);
rnd_size &= ~(page_size - 1);