diff options
author | Dave Barach <dave@barachs.net> | 2019-07-19 09:31:29 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-07-19 14:41:32 +0000 |
commit | 679478760a4dc87d1adf281c4562574bb25b539b (patch) | |
tree | f31d3b1a823a265f3316a5aa0c25ee3476bced94 /src/vlibapi | |
parent | f41110df9753ca369e1e253cbacfaa3bd4de2778 (diff) |
api: fix coverity warning
Type: fix
Ticket: VPP-1649
Change-Id: Ia159d0f67d33719d05fa2dbd82f9c8c9b5d8f2a9
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibapi')
-rw-r--r-- | src/vlibapi/api_shared.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c index 18eb83b68b7..355be35c677 100644 --- a/src/vlibapi/api_shared.c +++ b/src/vlibapi/api_shared.c @@ -480,10 +480,15 @@ msg_handler_internal (api_main_t * am, } *ed; ed = ELOG_DATA (am->elog_main, e); if (id < vec_len (am->msg_names)) - ed->c = elog_string (am->elog_main, (char *) am->msg_names[id]); + { + ed->c = elog_string (am->elog_main, (char *) am->msg_names[id]); + ed->barrier = !am->is_mp_safe[id]; + } else - ed->c = elog_string (am->elog_main, "BOGUS"); - ed->barrier = !am->is_mp_safe[id]; + { + ed->c = elog_string (am->elog_main, "BOGUS"); + ed->barrier = 0; + } } } |