Browse Source

correct assignment of a variable value to a 1-bit-field

only by a logic comparison.
pre-master-46
Holger Vogt 4 years ago
parent
commit
d5dc757288
  1. 8
      src/spicelib/analysis/optran.c

8
src/spicelib/analysis/optran.c

@ -75,13 +75,13 @@ void com_optran(wordlist* wl) {
int optrancom; int optrancom;
static bool dataset = FALSE; static bool dataset = FALSE;
static bool getdata = FALSE; static bool getdata = FALSE;
static unsigned char opiter = 1;
static bool opiter = TRUE;
static int ngminsteps = 1; static int ngminsteps = 1;
static int nsrcsteps = 1; static int nsrcsteps = 1;
/* current circuit */ /* current circuit */
if (ft_curckt && dataset && wl == NULL) { /* called from inp.c */ 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->TSKnumGminSteps = ngminsteps;
ft_curckt->ci_defTask->TSKnumSrcSteps = nsrcsteps; ft_curckt->ci_defTask->TSKnumSrcSteps = nsrcsteps;
getdata = FALSE; /* allow more calls to 'optran' */ getdata = FALSE; /* allow more calls to 'optran' */
@ -109,7 +109,7 @@ void com_optran(wordlist* wl) {
goto bugquit; goto bugquit;
if (optrancom == 0) { if (optrancom == 0) {
if (getdata) { if (getdata) {
opiter = 1;
opiter = TRUE;
} }
else { else {
ft_curckt->ci_defTask->TSKnoOpIter = 1; ft_curckt->ci_defTask->TSKnoOpIter = 1;
@ -117,7 +117,7 @@ void com_optran(wordlist* wl) {
} }
else { else {
if (getdata) { if (getdata) {
opiter = 0;
opiter = FALSE;
} }
else { else {
ft_curckt->ci_defTask->TSKnoOpIter = 0; ft_curckt->ci_defTask->TSKnoOpIter = 0;

Loading…
Cancel
Save