summaryrefslogtreecommitdiff
path: root/ext/ODBM_File
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-20 21:08:37 +0200
committerNicholas Clark <nick@ccl4.org>2010-10-21 11:34:28 +0200
commita5c6857cbad41a80aba26d560558a58cbba0505f (patch)
tree3e9da72b95e329f6a8aae589d9222e6911fb4598 /ext/ODBM_File
parent76cc365d064e9bf5a0e771bb8ae2bf380b8b0d25 (diff)
downloadperl-a5c6857cbad41a80aba26d560558a58cbba0505f.tar.gz
Convert [GNOS]DBM_File::TIEHASH to safecalloc() from safemalloc() then Zero().
Diffstat (limited to 'ext/ODBM_File')
-rw-r--r--ext/ODBM_File/ODBM_File.xs3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
index 8faf4a92d6..2d67f99f5c 100644
--- a/ext/ODBM_File/ODBM_File.xs
+++ b/ext/ODBM_File/ODBM_File.xs
@@ -107,8 +107,7 @@ odbm_TIEHASH(dbtype, filename, flags, mode)
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);