From 6ac641e9067e24bc79d89fde6bdc08c9da325811 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 28 Mar 2015 10:59:12 +0100 Subject: [PATCH] hisimhv2, remove excess casts --- src/spicelib/devices/hisimhv2/hsmhvask.c | 2 +- src/spicelib/devices/hisimhv2/hsmhvnoi.c | 20 ++++++++++---------- src/spicelib/devices/hisimhv2/hsmhvset.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/spicelib/devices/hisimhv2/hsmhvask.c b/src/spicelib/devices/hisimhv2/hsmhvask.c index 2420e6e85..3a78b515b 100644 --- a/src/spicelib/devices/hisimhv2/hsmhvask.c +++ b/src/spicelib/devices/hisimhv2/hsmhvask.c @@ -95,7 +95,7 @@ int HSMHV2ask( here->HSMHV2_csso = - (here->HSMHV2_csdo + here->HSMHV2_csgo + here->HSMHV2_csbo) ; /* NQS? */ - if (here->HSMHV2QIqiPtr == (double *)NULL) { + if (here->HSMHV2QIqiPtr == NULL) { flg_nqs = 0 ; } else { flg_nqs = 1 ; diff --git a/src/spicelib/devices/hisimhv2/hsmhvnoi.c b/src/spicelib/devices/hisimhv2/hsmhvnoi.c index f36b82ecb..3073ff719 100644 --- a/src/spicelib/devices/hisimhv2/hsmhvnoi.c +++ b/src/spicelib/devices/hisimhv2/hsmhvnoi.c @@ -164,17 +164,17 @@ int HSMHV2noise ( /* rs/rd thermal noise */ if ( model->HSMHV2_corsrd == 1 || model->HSMHV2_corsrd == 3 || model->HSMHV2_cordrift == 1 ) { - NevalSrc(&noizDens[HSMHV2RDNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHV2RDNOIZ], NULL, ckt, N_GAIN, here->HSMHV2dNodePrime, here->HSMHV2dNode, - (double) 0.0); + 0.0); noizDens[HSMHV2RDNOIZ] *= 4 * C_KB * TTEMP * here->HSMHV2drainConductance ; lnNdens[HSMHV2RDNOIZ] = log( MAX(noizDens[HSMHV2RDNOIZ],N_MINLOG) ); - NevalSrc(&noizDens[HSMHV2RSNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHV2RSNOIZ], NULL, ckt, N_GAIN, here->HSMHV2sNodePrime, here->HSMHV2sNode, - (double) 0.0); + 0.0); noizDens[HSMHV2RSNOIZ] *= 4 * C_KB * TTEMP * here->HSMHV2sourceConductance ; lnNdens[HSMHV2RSNOIZ] = log( MAX(noizDens[HSMHV2RSNOIZ],N_MINLOG) ); } else { @@ -185,10 +185,10 @@ int HSMHV2noise ( } /* channel thermal noise */ - NevalSrc(&noizDens[HSMHV2IDNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHV2IDNOIZ], NULL, ckt, N_GAIN, here->HSMHV2dNodePrime, here->HSMHV2sNodePrime, - (double) 0.0); + 0.0); switch( model->HSMHV2_noise ) { case 1: /* HiSIMHV model */ @@ -199,10 +199,10 @@ int HSMHV2noise ( } /* flicker noise */ - NevalSrc(&noizDens[HSMHV2FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHV2FLNOIZ], NULL, ckt, N_GAIN, here->HSMHV2dNodePrime, here->HSMHV2sNodePrime, - (double) 0.0); + 0.0); switch ( model->HSMHV2_noise ) { case 1: /* HiSIM model */ @@ -212,10 +212,10 @@ int HSMHV2noise ( } /* induced gate noise */ - NevalSrc(&noizDens[HSMHV2IGNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHV2IGNOIZ], NULL, ckt, N_GAIN, here->HSMHV2dNodePrime, here->HSMHV2sNodePrime, - (double) 0.0); + 0.0); switch ( model->HSMHV2_noise ) { case 1: /* HiSIM model */ diff --git a/src/spicelib/devices/hisimhv2/hsmhvset.c b/src/spicelib/devices/hisimhv2/hsmhvset.c index 809e7eb64..61b1c2b12 100644 --- a/src/spicelib/devices/hisimhv2/hsmhvset.c +++ b/src/spicelib/devices/hisimhv2/hsmhvset.c @@ -1182,7 +1182,7 @@ int HSMHV2setup( /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==NULL){\ return(E_NOMEM);\ } } while(0)