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
kvargs: fix invalid token parsing on FreeBSD
[dpdk.git]
/
lib
/
librte_kvargs
/
rte_kvargs.c
diff --git
a/lib/librte_kvargs/rte_kvargs.c
b/lib/librte_kvargs/rte_kvargs.c
index
1d815dc
..
285081c
100644
(file)
--- a/
lib/librte_kvargs/rte_kvargs.c
+++ b/
lib/librte_kvargs/rte_kvargs.c
@@
-50,7
+50,7
@@
rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params)
/* Find the end of the list. */
while (str[strlen(str) - 1] != ']') {
/* Restore the comma erased by strtok_r(). */
/* Find the end of the list. */
while (str[strlen(str) - 1] != ']') {
/* Restore the comma erased by strtok_r(). */
- if (ctx1[0] == '\0')
+ if (ctx1
== NULL || ctx1
[0] == '\0')
return -1; /* no closing bracket */
str[strlen(str)] = ',';
/* Parse until next comma. */
return -1; /* no closing bracket */
str[strlen(str)] = ',';
/* Parse until next comma. */