@@ -1324,15 +1324,15 @@ extern int errno;
1324
1324
/* handler for null strings in printf format */
1325
1325
#define NS (s ) ((s)?(s):"<NULL>")
1326
1326
1327
- extern char * do_malloc ;
1327
+ extern char * do_calloc ;
1328
1328
1329
1329
/* Convenient wrappers for malloc and realloc. Use them. */
1330
- #define new (type ) ((type*)my_alloc(do_malloc , sizeof (type), 1, __FILE__, __LINE__))
1331
- #define new0 (type ) ((type*)my_alloc(NULL , sizeof (type), 1, __FILE__, __LINE__))
1330
+ #define new (type ) ((type*)my_alloc(NULL , sizeof (type), 1, __FILE__, __LINE__))
1331
+ #define new0 (type ) ((type*)my_alloc(do_calloc , sizeof (type), 1, __FILE__, __LINE__))
1332
1332
#define realloc_buf (ptr , num ) my_alloc((ptr), (num), 1, __FILE__, __LINE__)
1333
1333
1334
- #define new_array (type , num ) ((type*)my_alloc(do_malloc , (num), sizeof (type), __FILE__, __LINE__))
1335
- #define new_array0 (type , num ) ((type*)my_alloc(NULL , (num), sizeof (type), __FILE__, __LINE__))
1334
+ #define new_array (type , num ) ((type*)my_alloc(NULL , (num), sizeof (type), __FILE__, __LINE__))
1335
+ #define new_array0 (type , num ) ((type*)my_alloc(do_calloc , (num), sizeof (type), __FILE__, __LINE__))
1336
1336
#define realloc_array (ptr , type , num ) ((type*)my_alloc((ptr), (num), sizeof (type), __FILE__, __LINE__))
1337
1337
1338
1338
#undef strdup
0 commit comments