summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-03-29 18:28:35 -0700
committerFlorin Coras <fcoras@cisco.com>2024-03-29 18:41:07 -0700
commitea5d5bdd1c4e912ce66f10a2b081460ce6ca2506 (patch)
treee5c7b1becbd3b3b3f7c08581564c33ef6f928f66 /src/vnet
parent7e9e2bd8f2240dc286c96440fca43ada3c3056d6 (diff)
session: fix api coverity warnings
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb4e9d9e39b937ad4c7316b3955b3ca296f0a191
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/session_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 2ecb464e38c..48eb932a2c9 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -711,9 +711,10 @@ done:
VL_API_APP_WORKER_ADD_DEL_REPLY,
((!rv && mp->is_add) ? vec_len (args.segment->name) : 0), ({
rmp->is_add = mp->is_add;
- rmp->wrk_index = clib_host_to_net_u32 (args.wrk_map_index);
+ rmp->wrk_index = mp->wrk_index;
if (!rv && mp->is_add)
{
+ rmp->wrk_index = clib_host_to_net_u32 (args.wrk_map_index);
rmp->segment_handle = clib_host_to_net_u64 (args.segment_handle);
rmp->app_event_queue_address =
fifo_segment_msg_q_offset ((fifo_segment_t *) args.segment, 0);
@@ -1465,10 +1466,11 @@ done:
rmp = &msg.worker_add_del_reply;
rmp->retval = rv;
rmp->is_add = mp->is_add;
+ rmp->wrk_index = mp->wrk_index;
rmp->api_client_handle = sapi_handle;
- rmp->wrk_index = args.wrk_map_index;
if (!rv && mp->is_add)
{
+ rmp->wrk_index = args.wrk_map_index;
rmp->segment_handle = args.segment_handle;
/* No segment name and size. This supports only memfds */
rmp->app_event_queue_address =