diff --git a/src/spicelib/devices/res/resload.c b/src/spicelib/devices/res/resload.c index 87e4efd94..f47b098bb 100644 --- a/src/spicelib/devices/res/resload.c +++ b/src/spicelib/devices/res/resload.c @@ -25,8 +25,6 @@ RESload(GENmodel *inModel, CKTcircuit *ckt) /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here = here->RESnextInstance) { - - if(!here->RESmGiven) here->RESm = 1.0; here->REScurrent = (*(ckt->CKTrhsOld+here->RESposNode) - *(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconduct; diff --git a/src/spicelib/devices/res/ressetup.c b/src/spicelib/devices/res/ressetup.c index d9b1f148a..fab007fa7 100644 --- a/src/spicelib/devices/res/ressetup.c +++ b/src/spicelib/devices/res/ressetup.c @@ -28,22 +28,10 @@ RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state) /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { - -/* - * Paolo Nenzi 2003 - * The following lines are needed if I will move the defaulting code - * from REStemp to RESsetup, as in other (more recent ?) spice devices - * - * ------------------------------------------LEGACY CODE - Francesco Lannutti - October 22, 2012 - * if (here->RESowner != ARCHme) - * goto matrixpointers; - * - * matrixpointers: - * ------------------------------------------ - * - * put here instance parameter defaulting. - */ - + + if(!here->RESmGiven) + here->RESm = 1.0; + /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\