CKTfndDev(), rewrite invocations where `type == NULL'
This commit is contained in:
parent
6c80cb4062
commit
f375ec6c10
|
|
@ -43,7 +43,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
}
|
||||
|
||||
// assert(third);
|
||||
here->MUTind1 = (INDinstance *) CKTfndDev(ckt, NULL, (GENinstance **) &(here->MUTind1), here->MUTindName1);
|
||||
if (!here->MUTind1)
|
||||
here->MUTind1 = (INDinstance *) CKTfndDev(ckt, NULL, NULL, here->MUTindName1);
|
||||
if (!here->MUTind1) {
|
||||
IFuid namarray[2];
|
||||
namarray[0]=here->MUTname;
|
||||
|
|
@ -53,7 +54,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
namarray);
|
||||
}
|
||||
// assert(third);
|
||||
here->MUTind2 = (INDinstance *) CKTfndDev(ckt, NULL, (GENinstance **) &(here->MUTind2), here->MUTindName2);
|
||||
if (!here->MUTind2)
|
||||
here->MUTind2 = (INDinstance *) CKTfndDev(ckt, NULL, NULL, here->MUTindName2);
|
||||
if (!here->MUTind2) {
|
||||
IFuid namarray[2];
|
||||
namarray[0]=here->MUTname;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
|
|||
* WILL be set on return unless error is not OK
|
||||
*/
|
||||
// assert(third) for all invocations
|
||||
*fast = sim->findInstance (ckt, NULL, fast, devnam);
|
||||
if (*fast == NULL)
|
||||
*fast = sim->findInstance (ckt, NULL, NULL, devnam);
|
||||
if (*fast == NULL)
|
||||
return (E_NODEV);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue