diff options
Diffstat (limited to 'src/plugins/memif/memif_api.c')
-rw-r--r-- | src/plugins/memif/memif_api.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/plugins/memif/memif_api.c b/src/plugins/memif/memif_api.c index 04c2c8daab2..9a2f42a5bc7 100644 --- a/src/plugins/memif/memif_api.c +++ b/src/plugins/memif/memif_api.c @@ -48,8 +48,6 @@ void memif_main_t *mm = &memif_main; u8 is_add; u32 socket_id; - u32 len; - u8 *socket_filename; vl_api_memif_socket_filename_add_del_reply_t *rmp; int rv; @@ -65,19 +63,10 @@ void } /* socket filename */ - socket_filename = 0; mp->socket_filename[ARRAY_LEN (mp->socket_filename) - 1] = 0; - len = strlen ((char *) mp->socket_filename); - if (mp->is_add) - { - vec_validate (socket_filename, len); - memcpy (socket_filename, mp->socket_filename, len); - } - - rv = vnet_api_error ( - memif_socket_filename_add_del (is_add, socket_id, socket_filename)); - vec_free (socket_filename); + rv = vnet_api_error (memif_socket_filename_add_del ( + is_add, socket_id, (char *) mp->socket_filename)); reply: REPLY_MACRO (VL_API_MEMIF_SOCKET_FILENAME_ADD_DEL_REPLY); |