CKTmodCrt(), cleanup, always assign to `*modfast'

for all invocations of CKTmodCrt() alias newModel()
the following is true
   (modfast != NULL) && (*modfast == NULL)
see
    (grep "git --no-pager grep -nH -e 'CKTmodCrt\\|newModel'")
This commit is contained in:
rlar 2013-07-17 21:08:27 +02:00
parent df5c785a84
commit 86264b9879
1 changed files with 2 additions and 2 deletions

View File

@ -30,11 +30,11 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
mymodfast->GENmodName = name;
mymodfast->GENnextModel = ckt->CKThead[type];
ckt->CKThead[type] = mymodfast;
if(modfast) *modfast=mymodfast;
nghash_insert(ckt->MODnameHash, name, mymodfast);
*modfast = mymodfast;
return(OK);
} else {
if(modfast) *modfast=mymodfast;
*modfast = mymodfast;
return(E_EXISTS);
}
/*NOTREACHED*/