aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/memif/memif_test.c4
-rw-r--r--src/vnet/mpls/mpls_api.c3
-rw-r--r--src/vppinfra/bihash_template.c3
3 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c
index cbef4dfa22e..a7c23daae9c 100644
--- a/src/plugins/memif/memif_test.c
+++ b/src/plugins/memif/memif_test.c
@@ -186,10 +186,10 @@ api_memif_create (vat_main_t * vam)
strncpy ((char *) mp->socket_filename, (char *) socket_filename, 127);
vec_free (socket_filename);
}
- if (socket_filename != 0)
+ if (secret != 0)
{
strncpy ((char *) mp->secret, (char *) secret, 16);
- vec_free (socket_filename);
+ vec_free (secret);
}
memcpy (mp->hw_addr, hw_addr, 6);
mp->rx_queues = rx_queues;
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 2af6af8fd48..a44b1a25653 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -68,9 +68,6 @@ vl_api_mpls_table_add_del_t_handler (vl_api_mpls_table_add_del_t * mp)
vnm = vnet_get_main ();
vnm->api_errno = 0;
-
- rv = (rv == 0) ? vnm->api_errno : rv;
-
REPLY_MACRO (VL_API_MPLS_TABLE_ADD_DEL_REPLY);
}
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c
index 704d1659fc8..2a5a5cd228a 100644
--- a/src/vppinfra/bihash_template.c
+++ b/src/vppinfra/bihash_template.c
@@ -509,10 +509,11 @@ u8 *BV (format_bihash_lru) (u8 * s, va_list * args)
for (i = 0; i < BIHASH_KVP_CACHE_SIZE; i++)
s = format (s, "[%d] ", ((cache_lru >> (3 * i)) & 7));
+
+ return (s);
#else
return format (s, "cache not configured");
#endif
- return (s);
}
void