summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-07-04 09:12:00 -0500
committerNicholas Clark <nick@ccl4.org>2005-07-04 19:36:51 +0000
commit3abe233e1ceba6675710708c5678345cce24ac62 (patch)
tree6d94b776e07f35480218ab138e028fb811c8b082
parent8afd2d2ecb560202b631f95a6aff50e34dd49052 (diff)
downloadperl-3abe233e1ceba6675710708c5678345cce24ac62.tar.gz
Remove unnecessary null check
Message-ID: <20050704191200.GA2614@petdance.com> p4raw-id: //depot/perl@25079
-rw-r--r--embed.fnc2
-rw-r--r--hv.c3
-rw-r--r--proto.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/embed.fnc b/embed.fnc
index f300dba66d..4835671897 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -997,7 +997,7 @@ s |void |require_errno |NN GV *gv
#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
s |void |hsplit |NN HV *hv
-s |void |hfreeentries |HV *hv
+s |void |hfreeentries |NN HV *hv
sa |HE* |new_he
sa |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags
s |void |hv_magic_check |NN HV *hv|NN bool *needs_copy|NN bool *needs_store
diff --git a/hv.c b/hv.c
index ee332c257f..00aabc03a0 100644
--- a/hv.c
+++ b/hv.c
@@ -1647,8 +1647,7 @@ S_hfreeentries(pTHX_ HV *hv)
I32 riter;
I32 max;
struct xpvhv_aux *iter;
- if (!hv)
- return;
+
if (!HvARRAY(hv))
return;
diff --git a/proto.h b/proto.h
index ebee0b6198..18250fcc38 100644
--- a/proto.h
+++ b/proto.h
@@ -2009,7 +2009,9 @@ STATIC void S_require_errno(pTHX_ GV *gv)
STATIC void S_hsplit(pTHX_ HV *hv)
__attribute__nonnull__(pTHX_1);
-STATIC void S_hfreeentries(pTHX_ HV *hv);
+STATIC void S_hfreeentries(pTHX_ HV *hv)
+ __attribute__nonnull__(pTHX_1);
+
STATIC HE* S_new_he(pTHX)
__attribute__malloc__
__attribute__warn_unused_result__;