From eb1c8e92bc8bfdf5e2ee450c2d20c4e50d14cf9f Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 24 Jul 2016 16:12:28 +0200 Subject: [PATCH] cktop.c, #3/14, combine two `if' bodies --- src/spicelib/analysis/cktop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spicelib/analysis/cktop.c b/src/spicelib/analysis/cktop.c index 0cdfaf914..f9eb4ef79 100644 --- a/src/spicelib/analysis/cktop.c +++ b/src/spicelib/analysis/cktop.c @@ -430,6 +430,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, /* If we've got convergence, then try stepping up the sources */ if (converged == 0) { + for (i = 0, n = ckt->CKTnodes; n; n = n->next) OldRhsOld[i++] = ckt->CKTrhsOld[n->number]; @@ -439,10 +440,8 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, SPfrontEnd->IFerrorf (ERR_INFO, "One successful source step"); ckt->CKTsrcFact = ConvFact + raise; - } - if (converged == 0) do { fprintf (stderr, "Supplies reduced to %8.4f%% ", ckt->CKTsrcFact * 100); @@ -504,6 +503,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, ckt->CKTsrcFact = 1; } while ((raise >= 1e-7) && (ConvFact < 1)); + } FREE (OldRhsOld); FREE (OldCKTstate0);