INPparseNumMod(), #2/14, transform the `while' loop into a `for' loop
there was no 'continue' for this loop there was no 'break' out of this loop there was no assignment to txtCard, thus txtCard can't be NULL
This commit is contained in:
parent
e824cbd193
commit
c1c7b5305e
|
|
@ -346,7 +346,7 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
|
|||
if (txtCard) txtCard = txtCard->nextcard;
|
||||
|
||||
/* Now parse each remaining card */
|
||||
while (txtCard) {
|
||||
for (; txtCard; txtCard = txtCard->nextcard) {
|
||||
line = txtCard->line;
|
||||
cardType = E_MISSING;
|
||||
cardNum++;
|
||||
|
|
@ -453,7 +453,6 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
|
|||
lastType = cardType;
|
||||
break;
|
||||
}
|
||||
if (txtCard) txtCard = txtCard->nextcard;
|
||||
}
|
||||
*errMessage = err;
|
||||
return( 0 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue