Commit c716b187 by Vicent Marti

config: Fix unitialized variable warning

parent f0890fcc
...@@ -986,17 +986,16 @@ static int config_write(diskfile_backend *cfg, cvar_t *var) ...@@ -986,17 +986,16 @@ static int config_write(diskfile_backend *cfg, cvar_t *var)
break; break;
} }
} else { } else {
int cmp; int cmp = -1;
pre_end = cfg->reader.read_ptr; pre_end = cfg->reader.read_ptr;
error = parse_variable(cfg, &var_name, &var_value); if ((error = parse_variable(cfg, &var_name, &var_value)) == GIT_SUCCESS)
if (error == GIT_SUCCESS)
cmp = strcasecmp(var->name, var_name); cmp = strcasecmp(var->name, var_name);
free(var_name); free(var_name);
free(var_value); free(var_value);
if (error < GIT_SUCCESS || cmp) if (cmp != 0)
break; break;
post_start = cfg->reader.read_ptr; post_start = cfg->reader.read_ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment