summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi/vapi.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-02 11:59:14 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-05 11:35:57 +0000
commitfd67ece3d3eda0bd896aaa166d89b4f8e7f4e98f (patch)
treef8c725239953a91ba37f783805580cb21159f2e6 /src/vpp-api/vapi/vapi.c
parente4bb5bc7c153ec1b26abae00461aaf19f5541419 (diff)
Fix coverity warnings in VOM and VAPI
Change-Id: I0db55e079f9b1835668c8efe69e6e6f7f8437b00 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi.c')
-rw-r--r--src/vpp-api/vapi/vapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vpp-api/vapi/vapi.c b/src/vpp-api/vapi/vapi.c
index 25c0b3be1d3..658fd7e584c 100644
--- a/src/vpp-api/vapi/vapi.c
+++ b/src/vpp-api/vapi/vapi.c
@@ -238,7 +238,7 @@ vapi_lookup_vapi_msg_id_t (vapi_ctx_t ctx, u16 vl_msg_id)
{
return ctx->vl_msg_id_to_vapi_msg_t[vl_msg_id];
}
- return ~0;
+ return INVALID_MSG_ID;
}
vapi_error_e
@@ -337,7 +337,7 @@ vapi_connect (vapi_ctx_t ctx, const char *name,
u8 scratch[m->name_with_crc_len + 1];
memcpy (scratch, m->name_with_crc, m->name_with_crc_len + 1);
u32 id = vl_api_get_msg_index (scratch);
- if (~0 != id)
+ if (INVALID_MSG_ID != id)
{
if (id > UINT16_MAX)
{
@@ -716,7 +716,7 @@ vapi_dispatch_one (vapi_ctx_t ctx)
vapi_msg_free (ctx, msg);
return VAPI_EINVAL;
}
- if (~0 == (unsigned) ctx->vl_msg_id_to_vapi_msg_t[vpp_id])
+ if (INVALID_MSG_ID == (unsigned) ctx->vl_msg_id_to_vapi_msg_t[vpp_id])
{
VAPI_ERR ("Unknown msg ID received, id `%u' marked as not supported",
(unsigned) vpp_id);