diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-20 21:08:37 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-21 11:34:28 +0200 |
commit | a5c6857cbad41a80aba26d560558a58cbba0505f (patch) | |
tree | 3e9da72b95e329f6a8aae589d9222e6911fb4598 /ext/SDBM_File | |
parent | 76cc365d064e9bf5a0e771bb8ae2bf380b8b0d25 (diff) | |
download | perl-a5c6857cbad41a80aba26d560558a58cbba0505f.tar.gz |
Convert [GNOS]DBM_File::TIEHASH to safecalloc() from safemalloc() then Zero().
Diffstat (limited to 'ext/SDBM_File')
-rw-r--r-- | ext/SDBM_File/SDBM_File.xs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs index 6aafb6b99f..ac16062800 100644 --- a/ext/SDBM_File/SDBM_File.xs +++ b/ext/SDBM_File/SDBM_File.xs @@ -40,8 +40,7 @@ sdbm_TIEHASH(dbtype, filename, flags, mode) 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 ; } |