From f6e6da9247f3a7ca5c298bc95a882b1684e957ba Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 12 Oct 2021 08:41:09 -0700 Subject: api: cli coverity fixes Type: fix Signed-off-by: Florin Coras Change-Id: I515be7ea213250fe89a2b2be06f3636fe8f493a8 --- src/vlibmemory/vlib_api_cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vlibmemory') 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; -- cgit 1.2.3-korg