inp2q.c, #19/23, rewrite, move code into the 'for' loop

This commit is contained in:
rlar 2017-03-11 18:29:12 +01:00
parent b1ccdd2184
commit b85a07c62c
1 changed files with 4 additions and 7 deletions

View File

@ -78,16 +78,13 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode)
current->error = INPgetMod(ckt, model, &thismodel, tab);
break;
}
if (i >= max_i)
break;
if (i >= max_i) {
LITERR ("could not find a valid modelname");
return;
}
INPtermInsert(ckt, &nname[i], tab, &node[i]);
}
if (!model) {
LITERR ("could not find a valid modelname");
return;
}
if (i == 3) {
/* 3-terminal device - substrate to ground */
node[3] = gnode;