git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice/base: fix uninitialized stack variables
[dpdk.git]
/
lib
/
librte_cmdline
/
cmdline_parse_num.c
diff --git
a/lib/librte_cmdline/cmdline_parse_num.c
b/lib/librte_cmdline/cmdline_parse_num.c
index
55c7a81
..
478f181
100644
(file)
--- a/
lib/librte_cmdline/cmdline_parse_num.c
+++ b/
lib/librte_cmdline/cmdline_parse_num.c
@@
-196,7
+196,7
@@
cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
case HEX:
st = HEX_OK;
case HEX:
st = HEX_OK;
- /* fall-through
no break
*/
+ /* fall-through */
case HEX_OK:
if (c >= '0' && c <= '9') {
if (add_to_res(c - '0', &res1, 16) < 0)
case HEX_OK:
if (c >= '0' && c <= '9') {
if (add_to_res(c - '0', &res1, 16) < 0)
@@
-340,7
+340,7
@@
cmdline_get_help_num(cmdline_parse_token_hdr_t *tk, char *dstbuf, unsigned int s
/* if (nd.type >= (sizeof(num_help)/sizeof(const char *))) */
/* return -1; */
/* if (nd.type >= (sizeof(num_help)/sizeof(const char *))) */
/* return -1; */
- ret = s
nprintf(dstbuf, size, "%s", num_help[nd.type]
);
+ ret = s
trlcpy(dstbuf, num_help[nd.type], size
);
if (ret < 0)
return -1;
dstbuf[size-1] = '\0';
if (ret < 0)
return -1;
dstbuf[size-1] = '\0';