realloc does work, even with NULL argument

This commit is contained in:
rlar 2010-10-27 16:40:10 +00:00
parent 29f34fc734
commit de35847146
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-10-27 Robert Larice
* src/spicelib/devices/asrc/asrcset.c ,
* src/xspice/mif/mifgetvalue.c :
realloc does work, even with NULL argument
2010-10-27 Robert Larice
* src/spicelib/devices/bsim3soi/b4soitemp.c :
use tmalloc instead of malloc

View File

@ -34,7 +34,7 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
for (here = model->ASRCinstances; here != NULL ;
here=here->ASRCnextInstance) {
here->ASRCposptr = (double **)MALLOC(0);
here->ASRCposptr = NULL;
j=0; /*strchr of the array holding ptrs to SMP */
v_first = 1;
if( here->ASRCtype == ASRC_VOLTAGE){

View File

@ -120,7 +120,7 @@ MIFgetValue (
return(NULL);
}
val.v.numValue = 0;
val.v.vec.iVec = (int *) MALLOC(1); /* just so that realloc doesn't bomb */
val.v.vec.iVec = NULL;
}