From d5dc757288a320918fdd06c455db273711eef849 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 1 Nov 2021 23:10:35 +0100 Subject: [PATCH] correct assignment of a variable value to a 1-bit-field only by a logic comparison. --- src/spicelib/analysis/optran.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/spicelib/analysis/optran.c b/src/spicelib/analysis/optran.c index 4952a88ca..aceddbc2c 100644 --- a/src/spicelib/analysis/optran.c +++ b/src/spicelib/analysis/optran.c @@ -75,13 +75,13 @@ void com_optran(wordlist* wl) { int optrancom; static bool dataset = FALSE; static bool getdata = FALSE; - static unsigned char opiter = 1; + static bool opiter = TRUE; static int ngminsteps = 1; static int nsrcsteps = 1; /* current circuit */ if (ft_curckt && dataset && wl == NULL) { /* called from inp.c */ - ft_curckt->ci_defTask->TSKnoOpIter = opiter; + ft_curckt->ci_defTask->TSKnoOpIter = (opiter != 0); ft_curckt->ci_defTask->TSKnumGminSteps = ngminsteps; ft_curckt->ci_defTask->TSKnumSrcSteps = nsrcsteps; getdata = FALSE; /* allow more calls to 'optran' */ @@ -109,7 +109,7 @@ void com_optran(wordlist* wl) { goto bugquit; if (optrancom == 0) { if (getdata) { - opiter = 1; + opiter = TRUE; } else { ft_curckt->ci_defTask->TSKnoOpIter = 1; @@ -117,7 +117,7 @@ void com_optran(wordlist* wl) { } else { if (getdata) { - opiter = 0; + opiter = FALSE; } else { ft_curckt->ci_defTask->TSKnoOpIter = 0;