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,
AZ(VSB_finish(vsb));
switch (which) {
case MCF_DEFAULT:
free(pp->dyn_def);
pp->dyn_def = strdup(VSB_data(vsb));
AN(pp->dyn_def);
REPLACE(pp->dyn_def, VSB_data(vsb));
pp->def = pp->dyn_def;
break;
case MCF_MINIMUM:
free(pp->dyn_min);
pp->dyn_min = strdup(VSB_data(vsb));
AN(pp->dyn_min);
REPLACE(pp->dyn_min, VSB_data(vsb));
pp->min = pp->dyn_min;
break;
case MCF_MAXIMUM:
free(pp->dyn_max);
pp->dyn_max = strdup(VSB_data(vsb));
AN(pp->dyn_max);
REPLACE(pp->dyn_max, VSB_data(vsb));
pp->max = pp->dyn_max;
break;
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