Browse Source

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'")
pre-master-46
rlar 13 years ago
parent
commit
86264b9879
  1. 4
      src/spicelib/analysis/cktmcrt.c

4
src/spicelib/analysis/cktmcrt.c

@ -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…
Cancel
Save