summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp.c2
-rw-r--r--pp_sys.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index e3773b229e..ca4f61d4cb 100644
--- a/pp.c
+++ b/pp.c
@@ -1493,7 +1493,7 @@ PP(pp_repeat)
if (len > ((MEM_SIZE)~0)/count)
Perl_croak(aTHX_ oom_string_extend);
MEM_WRAP_CHECK_1(max, char, oom_string_extend);
- SvGROW(TARG, (count * len) + 1);
+ SvGROW(TARG, max + 1);
repeatcpy(SvPVX(TARG) + len, SvPVX(TARG), len, count - 1);
SvCUR_set(TARG, SvCUR(TARG) * count);
}
diff --git a/pp_sys.c b/pp_sys.c
index 135ae01616..c127b64fdb 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1702,7 +1702,7 @@ PP(pp_sysread)
SvCUR_set(bufsv, offset);
read_target = sv_newmortal();
- SvUPGRADE(read_target, SVt_PV);
+ (void)SvUPGRADE(read_target, SVt_PV);
buffer = SvGROW(read_target, (STRLEN)(length + 1));
}