From f46dbc883bf42f363e9b5a419ca564270c54f402 Mon Sep 17 00:00:00 2001 From: rlar Date: Wed, 17 Jul 2013 20:32:58 +0200 Subject: [PATCH] CKTfndMod(), this wont happen any more and `*type' will be overwritten anyway --- src/spicelib/analysis/cktfndm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/spicelib/analysis/cktfndm.c b/src/spicelib/analysis/cktfndm.c index d4eec4ca8..2477e4c66 100644 --- a/src/spicelib/analysis/cktfndm.c +++ b/src/spicelib/analysis/cktfndm.c @@ -18,19 +18,13 @@ CKTfndMod(CKTcircuit *ckt, int *type, GENmodel **modfast, IFuid modname) { GENmodel *mods; - if(modfast != NULL && *modfast != NULL) { - /* already have modfast, so nothing to do */ - if(type) *type = (*modfast)->GENmodType; - return *modfast; - } if(*type >=0 && *type < DEVmaxnum) { /* have device type, need to find model */ /* look through all models */ for(mods=ckt->CKThead[*type]; mods != NULL ; mods = mods->GENnextModel) { if(mods->GENmodName == modname) { - *modfast = mods; - return *modfast; + return mods; } } return NULL; @@ -42,8 +36,7 @@ CKTfndMod(CKTcircuit *ckt, int *type, GENmodel **modfast, IFuid modname) for(mods=ckt->CKThead[*type];mods!=NULL; mods = mods->GENnextModel) { if(mods->GENmodName == modname) { - *modfast = mods; - return *modfast; + return mods; } } }