summaryrefslogtreecommitdiff
path: root/ext/GDBM_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/GDBM_File
parent76cc365d064e9bf5a0e771bb8ae2bf380b8b0d25 (diff)
downloadperl-a5c6857cbad41a80aba26d560558a58cbba0505f.tar.gz
Convert [GNOS]DBM_File::TIEHASH to safecalloc() from safemalloc() then Zero().
Diffstat (limited to 'ext/GDBM_File')
-rw-r--r--ext/GDBM_File/GDBM_File.xs3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index b418b2537b..ef951bdd25 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -73,8 +73,7 @@ gdbm_TIEHASH(dbtype, name, read_write, mode, fatal_func = (FATALFUNC)croak)
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 ;
}