session/svm: fix coverity warnings
Change-Id: Ic5daed1f6c23d9561a04e235dcbf257f190d066a Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
e7cde313e1
commit
95e0ce0547
@ -21,6 +21,7 @@ svm_msg_q_alloc (svm_msg_q_cfg_t * cfg)
|
||||
{
|
||||
svm_msg_q_ring_t *ring;
|
||||
svm_msg_q_t *mq;
|
||||
uword size;
|
||||
int i;
|
||||
|
||||
if (!cfg)
|
||||
@ -39,8 +40,10 @@ svm_msg_q_alloc (svm_msg_q_cfg_t * cfg)
|
||||
if (cfg->ring_cfgs[i].data)
|
||||
ring->data = cfg->ring_cfgs[i].data;
|
||||
else
|
||||
ring->data = clib_mem_alloc_aligned (ring->nitems * ring->elsize,
|
||||
CLIB_CACHE_LINE_BYTES);
|
||||
{
|
||||
size = (uword) ring->nitems * ring->elsize;
|
||||
ring->data = clib_mem_alloc_aligned (size, CLIB_CACHE_LINE_BYTES);
|
||||
}
|
||||
}
|
||||
|
||||
return mq;
|
||||
|
@ -1217,7 +1217,11 @@ session_vpp_event_queues_allocate (session_manager_main_t * smm)
|
||||
eqs->name = format (0, "%s%c", "evt-qs-segment", 0);
|
||||
eqs->requested_va = smm->session_baseva;
|
||||
|
||||
ssvm_master_init (eqs, SSVM_SEGMENT_MEMFD);
|
||||
if (ssvm_master_init (eqs, SSVM_SEGMENT_MEMFD))
|
||||
{
|
||||
clib_warning ("failed to initialize queue segment");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (smm->evt_qs_use_memfd_seg)
|
||||
|
Reference in New Issue
Block a user