CKTfndDev(), #2/6, cleanup

This commit is contained in:
rlar 2013-06-30 12:47:50 +02:00
parent 065d71d1a8
commit eb97339637
1 changed files with 3 additions and 5 deletions

View File

@ -33,7 +33,7 @@ CKTfndDev(CKTcircuit *ckt, int *type, GENinstance **fast, IFuid name, GENmodel *
/* already have fast, so nothing much to do just get & set type */
if (type)
*type = (*fast)->GENmodPtr->GENmodType;
return(OK);
return OK;
}
if (modfast) {
@ -67,11 +67,10 @@ CKTfndDev(CKTcircuit *ckt, int *type, GENinstance **fast, IFuid name, GENmodel *
*fast = here;
return OK;
}
if (mods->GENmodName == modname) {
if (mods->GENmodName == modname)
return E_NODEV;
}
}
}
return E_NOMOD;
} else if (*type == -1) {
/* look through all types (UGH - worst case - take forever) */
@ -89,12 +88,11 @@ CKTfndDev(CKTcircuit *ckt, int *type, GENinstance **fast, IFuid name, GENmodel *
*fast = here;
return OK;
}
if (mods->GENmodName == modname) {
if (mods->GENmodName == modname)
return E_NODEV;
}
}
}
}
*type = -1;
return E_NODEV;
} else