CKTfndDev(), rewrite invocations where `type == NULL'

This commit is contained in:
rlar 2013-07-17 20:28:22 +02:00
parent 6c80cb4062
commit f375ec6c10
2 changed files with 6 additions and 3 deletions

View File

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

View File

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