From b1ccdd218491263b49b88f19319eac90ec680883 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 11 Mar 2017 16:06:51 +0100 Subject: [PATCH] inp2q.c, #18/23, rewrite, combine two 'for' loop's --- src/spicelib/parser/inp2q.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/spicelib/parser/inp2q.c b/src/spicelib/parser/inp2q.c index ce0d7b07e..50cd0c2da 100644 --- a/src/spicelib/parser/inp2q.c +++ b/src/spicelib/parser/inp2q.c @@ -66,17 +66,13 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); - for (i = 0; i < 3; i++) { - INPgetNetTok(&line, &nname[i], 1); - INPtermInsert(ckt, &nname[i], tab, &node[i]); - } model = NULL; thismodel = NULL; - for (i = 3; ; i++) { + for (i = 0; ; i++) { INPgetTok(&line, &nname[i], 1); - if (INPlookMod(nname[i])) { + if (i >= 3 && INPlookMod(nname[i])) { model = nname[i]; INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab);