summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-12-31 21:02:59 +0000
committerNicholas Clark <nick@ccl4.org>2004-12-31 21:02:59 +0000
commit392db708ea3e6ba973f656d139373678acbb4e63 (patch)
tree635452d1da897a285c5b3e4a86d7c90b0319a421 /gv.c
parent18ea00d7a2aca8b645ef7f054dd0117de27dfe0b (diff)
downloadperl-392db708ea3e6ba973f656d139373678acbb4e63.tar.gz
Because name is always NUL terminated we can incorporate length
0 names in the switch statement for length 1. p4raw-id: //depot/perl@23719
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index 8fb7fba623..b68f212860 100644
--- a/gv.c
+++ b/gv.c
@@ -952,8 +952,9 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
}
}
}
- } else if (len == 1) {
- /* Names of length 1. */
+ } else {
+ /* Names of length 1. (Or 0. But name is NUL terminated, so that will
+ be case '\0' in this switch statement (ie a default case) */
switch (*name) {
case '&':
case '`':