Browse Source

parser/inpdpar.c, #2/6, cleanup, use a 'switch'

pre-master-46
rlar 8 years ago
parent
commit
4140af6d29
  1. 14
      src/spicelib/parser/inpdpar.c

14
src/spicelib/parser/inpdpar.c

@ -67,8 +67,6 @@ INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
goto quit;
}
int type;
val = INPgetValue(ckt, line,
ft_sim->devices[dev]->instanceParms[i].dataType,
tab);
@ -85,12 +83,16 @@ INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
}
/* delete the union val */
type = ft_sim->devices[dev]->instanceParms[i].dataType;
type &= IF_VARTYPES;
if (type == IF_REALVEC)
switch (ft_sim->devices[dev]->instanceParms[i].dataType & IF_VARTYPES) {
case IF_REALVEC:
tfree(val->v.vec.rVec);
else if (type == IF_INTVEC)
break;
case IF_INTVEC:
tfree(val->v.vec.iVec);
break;
default:
break;
}
FREE(parm);
}

Loading…
Cancel
Save