From: Nicholas Clark Date: Fri, 31 Dec 2004 21:02:59 +0000 (+0000) Subject: Because name is always NUL terminated we can incorporate length X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=392db708ea3e6ba973f656d139373678acbb4e63;p=p5sagit%2Fp5-mst-13.2.git Because name is always NUL terminated we can incorporate length 0 names in the switch statement for length 1. p4raw-id: //depot/perl@23719 --- diff --git a/gv.c b/gv.c index 8fb7fba..b68f212 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 '`':