tool_getparam: fix potentially uninitialized err

This commit is contained in:
Jay Satiro 2017-07-09 12:04:42 -04:00
parent 59a0fb2439
commit 17da675002
1 changed files with 2 additions and 1 deletions

View File

@ -1634,7 +1634,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
if(!file)
warnf(global, "Failed to open %s!\n", &nextarg[1]);
else {
if(PARAM_OK == file2memory(&string, &len, file)) {
err = file2memory(&string, &len, file);
if(!err) {
/* Allow strtok() here since this isn't used threaded */
/* !checksrc! disable BANNEDFUNC 2 */
char *h = strtok(string, "\r\n");