summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2007-05-02 19:45:54 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-05-03 09:30:08 +0000
commitc86f7df56cc91b3d77b0e549030650319f540a6b (patch)
tree9ee270048ed4362bdf1c9a911cc97479f63250de /regcomp.c
parent08aeb9f701fa786d490e79e99ac2f9f9de229da3 (diff)
downloadperl-c86f7df56cc91b3d77b0e549030650319f540a6b.tar.gz
The revenge of the consts
Message-ID: <20070503054554.GA30975@petdance.com> p4raw-id: //depot/perl@31123
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/regcomp.c b/regcomp.c
index 6b123c3706..4729780112 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6434,8 +6434,7 @@ S_reg_recode(pTHX_ const char value, SV **encp)
{
STRLEN numlen = 1;
SV * const sv = sv_2mortal(newSVpvn(&value, numlen));
- const char * const s = encp && *encp ? sv_recode_to_utf8(sv, *encp)
- : SvPVX(sv);
+ const char * const s = *encp ? sv_recode_to_utf8(sv, *encp) : SvPVX(sv);
const STRLEN newlen = SvCUR(sv);
UV uv = UNICODE_REPLACEMENT;
@@ -6446,8 +6445,7 @@ S_reg_recode(pTHX_ const char value, SV **encp)
if (!newlen || numlen != newlen) {
uv = UNICODE_REPLACEMENT;
- if (encp)
- *encp = NULL;
+ *encp = NULL;
}
return uv;
}