Commit 779459ac authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Poul-Henning Kamp

Apply replace.cocci patch for @fgsch's suggestion

parent b8ee449f
...@@ -708,21 +708,15 @@ MCF_ParamConf(enum mcf_which_e which, const char * const param, ...@@ -708,21 +708,15 @@ MCF_ParamConf(enum mcf_which_e which, const char * const param,
AZ(VSB_finish(vsb)); AZ(VSB_finish(vsb));
switch (which) { switch (which) {
case MCF_DEFAULT: case MCF_DEFAULT:
free(pp->dyn_def); REPLACE(pp->dyn_def, VSB_data(vsb));
pp->dyn_def = strdup(VSB_data(vsb));
AN(pp->dyn_def);
pp->def = pp->dyn_def; pp->def = pp->dyn_def;
break; break;
case MCF_MINIMUM: case MCF_MINIMUM:
free(pp->dyn_min); REPLACE(pp->dyn_min, VSB_data(vsb));
pp->dyn_min = strdup(VSB_data(vsb));
AN(pp->dyn_min);
pp->min = pp->dyn_min; pp->min = pp->dyn_min;
break; break;
case MCF_MAXIMUM: case MCF_MAXIMUM:
free(pp->dyn_max); REPLACE(pp->dyn_max, VSB_data(vsb));
pp->dyn_max = strdup(VSB_data(vsb));
AN(pp->dyn_max);
pp->max = pp->dyn_max; pp->max = pp->dyn_max;
break; break;
default: default:
......
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