realloc does work, even with NULL argument
This commit is contained in:
parent
29f34fc734
commit
de35847146
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue