X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fioam%2Flib-pot%2Fpot_api.c;h=31ddf9da528e6f724d1b378318f50cecc73d7ccc;hb=2dbee9361e74d03727a8b618ba80a5e28c006011;hp=0d0e49de20a128a139487bed1d152a4394260b48;hpb=ab96454e3aba8e60094e773a39e9d28f50d7192e;p=vpp.git diff --git a/src/plugins/ioam/lib-pot/pot_api.c b/src/plugins/ioam/lib-pot/pot_api.c index 0d0e49de20a..31ddf9da528 100644 --- a/src/plugins/ioam/lib-pot/pot_api.c +++ b/src/plugins/ioam/lib-pot/pot_api.c @@ -43,8 +43,7 @@ static void vl_api_pot_profile_add_t_handler pot_profile *profile = NULL; u8 *name = 0; - if (mp->list_name_len) - name = format(0, "%s", mp->list_name); + name = vl_api_from_api_to_new_vec(&mp->list_name); pot_profile_list_init(name); id = mp->id; @@ -122,8 +121,7 @@ static void vl_api_pot_profile_activate_t_handler u8 id; u8 *name = NULL; - if (mp->list_name_len) - name = format(0, "%s", mp->list_name); + name = vl_api_from_api_to_new_vec(&mp->list_name); if (!pot_profile_list_is_enabled(name)) { rv = -1; } else {