From 82f618c35f4a7182a98fda69fa07f2335a7d03ea Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 13 Oct 2021 11:35:15 +0200 Subject: dpdk: fix vmbus device name parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unformat_init_vector() expects a vector, not a NULL-terminated C-string. Type: fix Change-Id: I20a266243f63d94b0c6fe24e25ee8346c08c8ff2 Signed-off-by: Benoît Ganne --- src/vppinfra/format.h | 4 ++-- src/vppinfra/unformat.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/vppinfra') diff --git a/src/vppinfra/format.h b/src/vppinfra/format.h index 70882adac99..cad9b0e0ef2 100644 --- a/src/vppinfra/format.h +++ b/src/vppinfra/format.h @@ -242,8 +242,8 @@ uword va_unformat (unformat_input_t * i, const char *fmt, va_list * args); void unformat_init_command_line (unformat_input_t * input, char *argv[]); /* Setup for unformat of given string. */ -void unformat_init_string (unformat_input_t * input, - char *string, int string_len); +void unformat_init_string (unformat_input_t *input, const char *string, + int string_len); always_inline void unformat_init_cstring (unformat_input_t * input, char *string) diff --git a/src/vppinfra/unformat.c b/src/vppinfra/unformat.c index 172182f8a34..0f6da4fd3b9 100644 --- a/src/vppinfra/unformat.c +++ b/src/vppinfra/unformat.c @@ -1026,7 +1026,8 @@ unformat_init_command_line (unformat_input_t * input, char *argv[]) } __clib_export void -unformat_init_string (unformat_input_t * input, char *string, int string_len) +unformat_init_string (unformat_input_t *input, const char *string, + int string_len) { unformat_init (input, 0, 0); if (string_len > 0) -- cgit 1.2.3-korg