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:
rlar 2016-07-10 17:04:43 +02:00
parent e824cbd193
commit c1c7b5305e
1 changed files with 1 additions and 2 deletions

View File

@ -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 );