diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-07-15 14:51:53 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-07-15 14:51:53 +0000 |
commit | 837cb3baceb77ebdb19584af90d9148242208eb6 (patch) | |
tree | 2bde7914ed1dfa7b49a18e80cae5886173624a32 /sv.c | |
parent | e27835eefa408ae52d4ae22eec67eea282a87949 (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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), |