From 5042ffc5cc7910d2e37c2ed5874206ea043131c6 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 28 Mar 2015 11:59:31 +0100 Subject: [PATCH] hisimhv1, remove excess casts --- src/spicelib/devices/hisimhv1/hsmhvask.c | 2 +- src/spicelib/devices/hisimhv1/hsmhvnoi.c | 20 ++++++++++---------- src/spicelib/devices/hisimhv1/hsmhvset.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/spicelib/devices/hisimhv1/hsmhvask.c b/src/spicelib/devices/hisimhv1/hsmhvask.c index a40082d6c..9363a2ca7 100644 --- a/src/spicelib/devices/hisimhv1/hsmhvask.c +++ b/src/spicelib/devices/hisimhv1/hsmhvask.c @@ -53,7 +53,7 @@ int HSMHVask( here->HSMHV_csso = - (here->HSMHV_csdo + here->HSMHV_csgo + here->HSMHV_csbo) ; /* NQS? */ - if (here->HSMHVQIqiPtr == (double *)NULL) { + if (here->HSMHVQIqiPtr == NULL) { flg_nqs = 0 ; } else { flg_nqs = 1 ; diff --git a/src/spicelib/devices/hisimhv1/hsmhvnoi.c b/src/spicelib/devices/hisimhv1/hsmhvnoi.c index 86789e4bb..eb6bd89a7 100644 --- a/src/spicelib/devices/hisimhv1/hsmhvnoi.c +++ b/src/spicelib/devices/hisimhv1/hsmhvnoi.c @@ -122,17 +122,17 @@ int HSMHVnoise ( /* rs/rd thermal noise */ if ( model->HSMHV_corsrd == 1 || model->HSMHV_corsrd == 3 ) { - NevalSrc(&noizDens[HSMHVRDNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHVRDNOIZ], NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVdNode, - (double) 0.0); + 0.0); noizDens[HSMHVRDNOIZ] *= 4 * C_KB * TTEMP * here->HSMHVdrainConductance ; lnNdens[HSMHVRDNOIZ] = log( MAX(noizDens[HSMHVRDNOIZ],N_MINLOG) ); - NevalSrc(&noizDens[HSMHVRSNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHVRSNOIZ], NULL, ckt, N_GAIN, here->HSMHVsNodePrime, here->HSMHVsNode, - (double) 0.0); + 0.0); noizDens[HSMHVRSNOIZ] *= 4 * C_KB * TTEMP * here->HSMHVsourceConductance ; lnNdens[HSMHVRSNOIZ] = log( MAX(noizDens[HSMHVRSNOIZ],N_MINLOG) ); } else { @@ -143,10 +143,10 @@ int HSMHVnoise ( } /* channel thermal noise */ - NevalSrc(&noizDens[HSMHVIDNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHVIDNOIZ], NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVsNodePrime, - (double) 0.0); + 0.0); switch( model->HSMHV_noise ) { case 1: /* HiSIMHV model */ @@ -157,10 +157,10 @@ int HSMHVnoise ( } /* flicker noise */ - NevalSrc(&noizDens[HSMHVFLNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHVFLNOIZ], NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVsNodePrime, - (double) 0.0); + 0.0); switch ( model->HSMHV_noise ) { case 1: /* HiSIM model */ @@ -170,10 +170,10 @@ int HSMHVnoise ( } /* induced gate noise */ - NevalSrc(&noizDens[HSMHVIGNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSMHVIGNOIZ], NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVsNodePrime, - (double) 0.0); + 0.0); switch ( model->HSMHV_noise ) { case 1: /* HiSIM model */ diff --git a/src/spicelib/devices/hisimhv1/hsmhvset.c b/src/spicelib/devices/hisimhv1/hsmhvset.c index 6f5fe638b..e598aff14 100644 --- a/src/spicelib/devices/hisimhv1/hsmhvset.c +++ b/src/spicelib/devices/hisimhv1/hsmhvset.c @@ -959,7 +959,7 @@ int HSMHVsetup( /* 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)