aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/memif_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/memif/memif_test.c')
-rw-r--r--src/plugins/memif/memif_test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c
index e8fb37c949f..d3290ac0340 100644
--- a/src/plugins/memif/memif_test.c
+++ b/src/plugins/memif/memif_test.c
@@ -407,12 +407,11 @@ api_memif_create_v2 (vat_main_t *vam)
mp->ring_size = clib_host_to_net_u32 (ring_size);
mp->buffer_size = clib_host_to_net_u16 (buffer_size & 0xffff);
mp->socket_id = clib_host_to_net_u32 (socket_id);
- if (secret != 0)
- {
- char *p = (char *) &mp->secret;
- p += vl_api_vec_to_api_string (secret, (vl_api_string_t *) p);
- vec_free (secret);
- }
+
+ char *p = (char *) &mp->secret;
+ p += vl_api_vec_to_api_string (secret, (vl_api_string_t *) p);
+ vec_free (secret);
+
memcpy (mp->hw_addr, hw_addr, 6);
mp->rx_queues = rx_queues;
mp->tx_queues = tx_queues;