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:
parent
df5c785a84
commit
86264b9879
|
|
@ -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*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue