|
|
@@ -1454,14 +1454,14 @@ static char *parse_config(json_t *config)
|
|
|
struct opt_table *opt;
|
|
|
|
|
|
for (opt = opt_config_table; opt->type != OPT_END; opt++) {
|
|
|
- char *p, *name;
|
|
|
+ char *p, *name, *sp;
|
|
|
|
|
|
/* We don't handle subtables. */
|
|
|
assert(!(opt->type & OPT_SUBTABLE));
|
|
|
|
|
|
/* Pull apart the option name(s). */
|
|
|
name = strdup(opt->names);
|
|
|
- for (p = strtok(name, "|"); p; p = strtok(NULL, "|")) {
|
|
|
+ for (p = strtok_r(name, "|", &sp); p; p = strtok_r(NULL, "|", &sp)) {
|
|
|
char *err;
|
|
|
/* Ignore short options. */
|
|
|
if (p[1] != '-')
|