From 761e556ac2743e3e090517b1de516dca7143ca39 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 24 Jul 2016 10:19:29 +0200 Subject: [PATCH] cktop.c, #6/14, simplify loop termination --- src/spicelib/analysis/cktop.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/spicelib/analysis/cktop.c b/src/spicelib/analysis/cktop.c index 110d037eb..7ec7d0b94 100644 --- a/src/spicelib/analysis/cktop.c +++ b/src/spicelib/analysis/cktop.c @@ -173,7 +173,7 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, if (ckt->CKTdiagGmin <= gtarget) { break; /* successfull */ - } else { + } for (i = 0, n = ckt->CKTnodes; n; n = n->next) OldRhsOld[i++] = ckt->CKTrhsOld[n->number]; @@ -197,13 +197,12 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, } else { ckt->CKTdiagGmin /= factor; } - } } else { if (factor < 1.00005) { SPfrontEnd->IFerrorf (ERR_WARNING, "Last gmin step failed"); break; /* failed */ - } else { + } SPfrontEnd->IFerrorf (ERR_WARNING, "Further gmin increment"); factor = sqrt (sqrt (factor)); @@ -214,7 +213,6 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, memcpy(ckt->CKTstate0, OldCKTstate0, (size_t) ckt->CKTnumStates * sizeof(double)); - } } }