aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-03-09 17:10:25 -0500
committerDave Barach <openvpp@barachs.net>2017-03-10 13:45:11 +0000
commita331e6fc45e175aa2a0544150ddae16f82fae833 (patch)
tree65a5723a060120258ffdde6c50b8d77f1707c470 /src
parent69b7aa424abaec4adae0e9007794cf35a7f9849f (diff)
VPP-608: warnings be gone
Change-Id: I6d30c6a8d1a425c531e7206e46143d528980c48e Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src')
-rw-r--r--src/vpp/api/api_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vpp/api/api_main.c b/src/vpp/api/api_main.c
index 7913bc01e9d..d3764337b11 100644
--- a/src/vpp/api/api_main.c
+++ b/src/vpp/api/api_main.c
@@ -47,6 +47,8 @@ api_main_init (vlib_main_t * vm)
vam->vlib_main = vm;
vam->my_client_index = (u32) ~ 0;
+ /* Ensure that vam->inbuf is never NULL */
+ vec_validate (vam->inbuf, 0);
init_error_string_table (vam);
rv = vat_plugin_init (vam);
if (rv)
@@ -82,6 +84,14 @@ api_command_fn (vlib_main_t * vm,
vam->vl_input_queue = am->shmem_hdr->vl_input_queue;
+#ifdef __COVERITY
+ /*
+ * Convince Coverity that it's not a NULL pointer...
+ * Done once for real below, since we never vec_free(vam->inbuf);
+ */
+ vec_validate (vam->inbuf, 0);
+#endif
+
vec_reset_length (vam->inbuf);
vam->input = &_input;