summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-09-17 20:13:23 +0200
committerYves Orton <demerphq@gmail.com>2016-09-19 21:19:51 +0200
commit0a5fcc380f7f35fa2a6d7c16524a7a27ec4d0b08 (patch)
tree15b5e476a8f23bbd2cb30f6e7bea1dcb3f46a8e3 /sv.c
parent96160768517a92e1ca0bc25a0f2e1c8bf1461aae (diff)
downloadperl-0a5fcc380f7f35fa2a6d7c16524a7a27ec4d0b08.tar.gz
sv.c: sv_grow: newlen cannot be smaller than SvCUR()
This expression dates back to about 2003 or so, and as far as I can tell is no longer necessary.
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 3e8fb3dbe8..e2f199f9c5 100644
--- a/sv.c
+++ b/sv.c
@@ -1604,7 +1604,7 @@ Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen)
else {
s = (char*)safemalloc(newlen);
if (SvPVX_const(sv) && SvCUR(sv)) {
- Move(SvPVX_const(sv), s, (newlen < SvCUR(sv)) ? newlen : SvCUR(sv), char);
+ Move(SvPVX_const(sv), s, SvCUR(sv), char);
}
}
SvPV_set(sv, s);