RETVAL = NULL ;
if ((dbp = gdbm_open(name, GDBM_BLOCKSIZE, read_write, mode, fatal_func))) {
- RETVAL = (GDBM_File)safemalloc(sizeof(GDBM_File_type)) ;
- Zero(RETVAL, 1, GDBM_File_type) ;
+ RETVAL = (GDBM_File)safecalloc(1, sizeof(GDBM_File_type)) ;
RETVAL->dbp = dbp ;
}
RETVAL = NULL ;
if ((dbp = dbm_open(filename, flags, mode))) {
- RETVAL = (NDBM_File)safemalloc(sizeof(NDBM_File_type)) ;
- Zero(RETVAL, 1, NDBM_File_type) ;
+ RETVAL = (NDBM_File)safecalloc(1, sizeof(NDBM_File_type));
RETVAL->dbp = dbp ;
}
croak("ODBM_FILE: Can't open %s", filename);
}
dbp = (void*)(dbminit(filename) >= 0 ? &dbmrefcnt : 0);
- RETVAL = (ODBM_File)safemalloc(sizeof(ODBM_File_type)) ;
- Zero(RETVAL, 1, ODBM_File_type) ;
+ RETVAL = (ODBM_File)safecalloc(1, sizeof(ODBM_File_type));
RETVAL->dbp = dbp ;
ST(0) = sv_mortalcopy(&PL_sv_undef);
sv_setptrobj(ST(0), RETVAL, dbtype);
RETVAL = NULL ;
if ((dbp = sdbm_open(filename,flags,mode))) {
- RETVAL = (SDBM_File)safemalloc(sizeof(SDBM_File_type)) ;
- Zero(RETVAL, 1, SDBM_File_type) ;
+ RETVAL = (SDBM_File)safecalloc(1, sizeof(SDBM_File_type));
RETVAL->dbp = dbp ;
}