parser/inpdpar.c, cleanup, for(;;) search, break then process
This commit is contained in:
parent
8cf4f16ec0
commit
81f7b6f40d
|
|
@ -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;
|
||||
} else {
|
||||
|
||||
int type;
|
||||
|
||||
|
|
@ -84,13 +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