X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fcmdline%2Fparse_obj_list.c;h=959bcd14527e4be538b5c8a89d269e713d4f3564;hb=23f7ec1d9b7ccfcfb9b9f67d33cf6cbf7f5034d3;hp=69eb448e7aebe64b67eafe0b53a19938f90a1e4e;hpb=0cdc9c96944885cf9141fda1a4d0bfdbd54c8ca6;p=dpdk.git diff --git a/examples/cmdline/parse_obj_list.c b/examples/cmdline/parse_obj_list.c index 69eb448e7a..959bcd1452 100644 --- a/examples/cmdline/parse_obj_list.c +++ b/examples/cmdline/parse_obj_list.c @@ -6,11 +6,9 @@ #include #include -#include #include #include #include -#include #include #include @@ -98,13 +96,13 @@ int complete_get_elt_obj_list(cmdline_parse_token_hdr_t *tk, return -1; if (dstbuf) - snprintf(dstbuf, size, "%s", o->name); + strlcpy(dstbuf, o->name, size); return 0; } -int get_help_obj_list(__attribute__((unused)) cmdline_parse_token_hdr_t *tk, +int get_help_obj_list(__rte_unused cmdline_parse_token_hdr_t *tk, char *dstbuf, unsigned int size) { snprintf(dstbuf, size, "Obj-List");