RALLOC usage unification, drop braces around the second argument

This commit is contained in:
rlar 2010-10-24 13:24:02 +00:00
parent bfc7a4cd7b
commit 11c2ff1720
3 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2010-10-24 Robert Larice
* src/spicelib/devices/asrc/asrcset.c ,
* src/xspice/mif/mif_inp2.c :
RALLOC usage unification, drop braces around the second argument
2010-10-24 Robert Larice
* src/spicelib/devices/ndev/ndevset.c :
use char* instead of void*

View File

@ -72,7 +72,7 @@ if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number))\
}
here->ASRCposptr = (double **)
REALLOC(here->ASRCposptr, (sizeof(double *)*(j+5)));
REALLOC(here->ASRCposptr, sizeof(double *)*(j+5));
TSTALLOC(ASRCposptr[j++],ASRCposNode,ASRCbranch);
TSTALLOC(ASRCposptr[j++],ASRCnegNode,ASRCbranch);
TSTALLOC(ASRCposptr[j++],ASRCbranch,ASRCnegNode);
@ -99,13 +99,13 @@ if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number))\
v_first = 0;
} else{
here->ASRCposptr = (double **)
REALLOC(here->ASRCposptr, (sizeof(double *)*(j+1)));
REALLOC(here->ASRCposptr, sizeof(double *)*(j+1));
TSTALLOC(ASRCposptr[j++],ASRCbranch,ASRCcont_br);
}
} else if(here->ASRCtype == ASRC_CURRENT){
/* CCCS */
here->ASRCposptr = (double **)
REALLOC(here->ASRCposptr, (sizeof(double *) * (j+2)));
REALLOC(here->ASRCposptr, sizeof(double *) * (j+2));
TSTALLOC(ASRCposptr[j++],ASRCposNode,ASRCcont_br);
TSTALLOC(ASRCposptr[j++],ASRCnegNode,ASRCcont_br);
} else{
@ -120,13 +120,13 @@ if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number))\
v_first = 0;
} else{
here->ASRCposptr = (double **)
REALLOC(here->ASRCposptr, (sizeof(double *) * (j+1)));
REALLOC(here->ASRCposptr, sizeof(double *) * (j+1));
MY_TSTALLOC(ASRCposptr[j++],ASRCbranch,here->ASRCtree->vars[i].nValue);
}
} else if(here->ASRCtype == ASRC_CURRENT){
/* VCCS */
here->ASRCposptr = (double **)
REALLOC(here->ASRCposptr, (sizeof(double *) * (j+2)));
REALLOC(here->ASRCposptr, sizeof(double *) * (j+2));
MY_TSTALLOC(ASRCposptr[j++],ASRCposNode,here->ASRCtree->vars[i].nValue);
MY_TSTALLOC(ASRCposptr[j++],ASRCnegNode,here->ASRCtree->vars[i].nValue);
} else{

View File

@ -775,7 +775,7 @@ MIFget_port(
else {
fast->conn[conn_num]->port = (Mif_Port_Data_t **) REALLOC(
fast->conn[conn_num]->port,
((port_num + 1) * sizeof(Mif_Port_Data_t *)) );
(port_num + 1) * sizeof(Mif_Port_Data_t *) );
fast->conn[conn_num]->port[port_num] = (Mif_Port_Data_t *) tmalloc(sizeof(Mif_Port_Data_t));
}