parser/inpdpar.c, #1/6, cleanup, search, break then process
This commit is contained in:
parent
bdf6091da7
commit
eb86a66146
|
|
@ -58,6 +58,14 @@ INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
|
|||
}
|
||||
for (i = 0; i < *(ft_sim->devices[dev]->numInstanceParms); i++) {
|
||||
if (strcmp(parm, ft_sim->devices[dev]->instanceParms[i].keyword) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i >= *(ft_sim->devices[dev]->numInstanceParms)) {
|
||||
errbuf = tprintf(" unknown parameter (%s) \n", parm);
|
||||
rtn = errbuf;
|
||||
goto quit;
|
||||
}
|
||||
|
||||
int type;
|
||||
|
||||
|
|
@ -84,14 +92,6 @@ INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
|
|||
else if (type == IF_INTVEC)
|
||||
tfree(val->v.vec.iVec);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == *(ft_sim->devices[dev]->numInstanceParms)) {
|
||||
errbuf = tprintf(" unknown parameter (%s) \n", parm);
|
||||
rtn = errbuf;
|
||||
goto quit;
|
||||
}
|
||||
FREE(parm);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue