aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-12 19:08:22 -0700
committerDave Barach <openvpp@barachs.net>2020-10-13 16:50:37 +0000
commit927eee410d5bf027ea8df0dc7d298c46d4e46100 (patch)
tree88e19bd215d0fba49b13f0e27228e774da3f7783 /src
parentd1b423c924202950acf36fea1d221bf1dda9b39d (diff)
svm: fix coverity warning
Type: fix Change-Id: I6c6255e66dd4cd0e4174b2a1658a3b8be40f0f7a Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/svm/ssvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index d2788e89222..c5511d96e1c 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -269,7 +269,7 @@ ssvm_server_init_memfd (ssvm_private_t * memfd)
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 @@ ssvm_server_init_private (ssvm_private_t * ssvm)
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);