X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fcmdline%2Fparse_obj_list.c;h=b04adbea585ca4684685982d4ec6bcf609dc5310;hb=41515403f1841c7444c648c21dc355c6fe258709;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..b04adbea58 100644 --- a/examples/cmdline/parse_obj_list.c +++ b/examples/cmdline/parse_obj_list.c @@ -98,13 +98,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");