Fix Coverity Scan CID 339921 (Using uninitialized value tokctx when calling __strtok_r_1c.)

This commit is contained in:
Dong Anyuan
2019-05-28 20:29:38 +09:00
parent c41af020a2
commit 0b48bb46be
+1 -1
View File
@@ -214,7 +214,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
/* first check help options, either --help, -h or --help_<section> */
if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) {
char *tokctx;
char *tokctx = NULL;
pp=strtok_r(oneargv, "_",&tokctx);
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;