aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-10-12 08:41:09 -0700
committerDamjan Marion <dmarion@me.com>2021-10-12 16:53:56 +0000
commitf6e6da9247f3a7ca5c298bc95a882b1684e957ba (patch)
tree54e2446dec89ebf90795ed9b209430f7ae89837b /src/vlibmemory
parent6d7dfcbfa4bc05f1308fc677f19ade44ea699da1 (diff)
api: cli coverity fixes
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I515be7ea213250fe89a2b2be06f3636fe8f493a8
Diffstat (limited to 'src/vlibmemory')
-rw-r--r--src/vlibmemory/vlib_api_cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c
index 74ad3c5cd76..268b682f09a 100644
--- a/src/vlibmemory/vlib_api_cli.c
+++ b/src/vlibmemory/vlib_api_cli.c
@@ -836,7 +836,7 @@ vl_msg_exec_json_command (vlib_main_t *vm, cJSON *o)
char *name = cJSON_GetStringValue (msg_id_obj);
cJSON *crc_obj = cJSON_GetObjectItem (o, "_crc");
- if (!msg_id_obj)
+ if (!crc_obj)
{
vlib_cli_output (vm, "Missing '_crc' element!\n");
return rv;
@@ -860,7 +860,7 @@ vl_msg_exec_json_command (vlib_main_t *vm, cJSON *o)
vec_free (name_crc);
cfgp = am->api_trace_cfg + msg_id;
- if (!cfgp)
+ if (!am->api_trace_cfg)
{
vlib_cli_output (vm, "msg id %d no trace config\n", msg_id);
return rv;