svm: fix coverity warning
Type: fix Change-Id: I6c6255e66dd4cd0e4174b2a1658a3b8be40f0f7a Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:
Florin Coras
committed by
Dave Barach
parent
d1b423c924
commit
927eee410d
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user