summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-07-15 14:51:53 +0000
committerNicholas Clark <nick@ccl4.org>2008-07-15 14:51:53 +0000
commit837cb3baceb77ebdb19584af90d9148242208eb6 (patch)
tree2bde7914ed1dfa7b49a18e80cae5886173624a32 /sv.c
parente27835eefa408ae52d4ae22eec67eea282a87949 (diff)
downloadperl-837cb3baceb77ebdb19584af90d9148242208eb6.tar.gz
Fix use of a variable before it is initialised, introduced by change
34138, spotted by Jerry D. Hedden. I assume that he's compiling with options that enable trace flow analysis from the C compiler. p4raw-id: //depot/perl@34144
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index c2b41714ac..04d6e432fa 100644
--- a/sv.c
+++ b/sv.c
@@ -4402,11 +4402,11 @@ Perl_sv_chop(pTHX_ register SV *const sv, register const char *const ptr)
}
/* SvPVX(sv) may move in SV_CHECK_THINKFIRST(sv), but after this line,
nothing uses the value of ptr any more. */
+ max_delta = SvLEN(sv) ? SvLEN(sv) : SvCUR(sv);
if (ptr <= SvPVX_const(sv))
Perl_croak(aTHX_ "panic: sv_chop ptr=%p, start=%p, end=%p",
ptr, SvPVX_const(sv), SvPVX_const(sv) + max_delta);
SV_CHECK_THINKFIRST(sv);
- max_delta = SvLEN(sv) ? SvLEN(sv) : SvCUR(sv);
if (delta > max_delta)
Perl_croak(aTHX_ "panic: sv_chop ptr=%p (was %p), start=%p, end=%p",
SvPVX_const(sv) + delta, ptr, SvPVX_const(sv),