projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use strsep instead of strtok to avoid a segfault
[project/uci.git]
/
util.c
diff --git
a/util.c
b/util.c
index
1d71335
..
eb50b89
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-103,15
+103,15
@@
int uci_parse_tuple(struct uci_context *ctx, char *str, char **package, char **s
last++;
}
last++;
}
- *package = str
tok(
str, ".");
+ *package = str
sep(&
str, ".");
if (!*package || !uci_validate_name(*package))
goto error;
if (!*package || !uci_validate_name(*package))
goto error;
- *section = str
tok(NULL
, ".");
+ *section = str
sep(&str
, ".");
if (!*section)
goto lastval;
if (!*section)
goto lastval;
- *option = str
tok(NULL
, ".");
+ *option = str
sep(&str
, ".");
if (!*option)
goto lastval;
if (!*option)
goto lastval;