summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi/vapi.hpp
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.hpp
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.hpp')
-rw-r--r--src/vpp-api/vapi/vapi.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vpp-api/vapi/vapi.hpp b/src/vpp-api/vapi/vapi.hpp
index e0fd2e5051c..893851a0dbb 100644
--- a/src/vpp-api/vapi/vapi.hpp
+++ b/src/vpp-api/vapi/vapi.hpp
@@ -105,7 +105,8 @@ public:
private:
Connection &con;
- Common_req (Connection &con) : con (con), response_state{RESPONSE_NOT_READY}
+ Common_req (Connection &con)
+ : con (con), context{0}, response_state{RESPONSE_NOT_READY}
{
}
@@ -577,13 +578,14 @@ private:
static void set_msg_id (vapi_msg_id_t id)
{
- assert ((~0 == *msg_id_holder ()) || (id == *msg_id_holder ()));
+ assert ((INVALID_MSG_ID == *msg_id_holder ()) ||
+ (id == *msg_id_holder ()));
*msg_id_holder () = id;
}
static vapi_msg_id_t *msg_id_holder ()
{
- static vapi_msg_id_t my_id{~0};
+ static vapi_msg_id_t my_id{INVALID_MSG_ID};
return &my_id;
}