X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_cmdline%2Fcmdline_parse_portlist.c;h=e1aa07be4b3300c26cfa795c05657b7538751aa7;hb=cdfa0dc1702bcfe6c403d3cfe4046b29c8e6c5b9;hp=5952f34389721939e9e4a86bd9c4f3a154bda167;hpb=add6c87ebe9337c66c3009f458c48fbccb727558;p=dpdk.git diff --git a/lib/librte_cmdline/cmdline_parse_portlist.c b/lib/librte_cmdline/cmdline_parse_portlist.c index 5952f34389..e1aa07be4b 100644 --- a/lib/librte_cmdline/cmdline_parse_portlist.c +++ b/lib/librte_cmdline/cmdline_parse_portlist.c @@ -72,7 +72,7 @@ parse_ports(cmdline_portlist_t *pl, const char *str) } int -cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk, +cmdline_parse_portlist(__rte_unused cmdline_parse_token_hdr_t *tk, const char *buf, void *res, unsigned ressize) { unsigned int token_len = 0; @@ -94,7 +94,7 @@ cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk, if (token_len >= PORTLIST_TOKEN_SIZE) return -1; - snprintf(portlist_str, token_len+1, "%s", buf); + strlcpy(portlist_str, buf, token_len + 1); if (pl) { pl->map = 0; @@ -108,7 +108,7 @@ cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk, } int -cmdline_get_help_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk, +cmdline_get_help_portlist(__rte_unused cmdline_parse_token_hdr_t *tk, char *dstbuf, unsigned int size) { int ret;