Browse Source

realloc does work, even with NULL argument

pre-master-46
rlar 16 years ago
parent
commit
de35847146
  1. 5
      ChangeLog
  2. 2
      src/spicelib/devices/asrc/asrcset.c
  3. 2
      src/xspice/mif/mifgetvalue.c

5
ChangeLog

@ -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

2
src/spicelib/devices/asrc/asrcset.c

@ -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){

2
src/xspice/mif/mifgetvalue.c

@ -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;
}

Loading…
Cancel
Save