summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-11-29 21:48:04 -0800
committerFlorin Coras <florin.coras@gmail.com>2021-11-30 05:38:37 +0000
commitbb1413bd1e16ab093fbde2a04555ec961ea7c20f (patch)
treedf68b9d82c94be808ad72a39a5dc5683f3e5f525
parentcba1c2258b0e5f2189baf5ccd90d6d61b4644ece (diff)
vppinfra: remove duplicate api function definition
vl_api_c_string_to_api_string declared in api_types.h and defined in api_shared.c. Remove from jsonformat Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I994c8c13b7246a857464c1f879432f73692c6d1f
-rw-r--r--src/vppinfra/jsonformat.c11
-rw-r--r--src/vppinfra/jsonformat.h2
2 files changed, 0 insertions, 13 deletions
diff --git a/src/vppinfra/jsonformat.c b/src/vppinfra/jsonformat.c
index 17b3ee9d3f8..1aa3864be04 100644
--- a/src/vppinfra/jsonformat.c
+++ b/src/vppinfra/jsonformat.c
@@ -428,17 +428,6 @@ format_ip4_address (u8 * s, va_list * args)
return format (s, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
}
-int
-vl_api_c_string_to_api_string (const char *buf, vl_api_string_t * str)
-{
- /* copy without nul terminator */
- u32 len = strlen (buf);
- if (len > 0)
- clib_memcpy_fast (str->buf, buf, len);
- str->length = htonl (len);
- return len + sizeof (u32);
-}
-
void
vl_api_string_cJSON_AddToObject(cJSON * const object, const char * const name, vl_api_string_t *astr)
{
diff --git a/src/vppinfra/jsonformat.h b/src/vppinfra/jsonformat.h
index d27785f0058..062e4e188ef 100644
--- a/src/vppinfra/jsonformat.h
+++ b/src/vppinfra/jsonformat.h
@@ -83,8 +83,6 @@ unformat_vl_api_timestamp_t (unformat_input_t *input, va_list *args);
CJSON_PUBLIC (uword)
unformat_vl_api_gbp_scope_t (unformat_input_t *input, va_list *args);
-CJSON_PUBLIC (int)
-vl_api_c_string_to_api_string (const char *buf, vl_api_string_t *str);
CJSON_PUBLIC (void)
vl_api_string_cJSON_AddToObject (cJSON *const object, const char *const name,
vl_api_string_t *astr);