summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-29 13:34:31 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-29 20:21:53 +0100
commit9dec788bd5a908311909e9ba11d34ff71be22e88 (patch)
tree9660d9d17aefb5846b21857052942d56ccd014a3 /pp_ctl.c
parent0325ce870db717d2d7fbb711037b421e273f08c5 (diff)
downloadperl-9dec788bd5a908311909e9ba11d34ff71be22e88.tar.gz
pp_formline: no need to *t = '\0' until end
We don't care whether PL_formtarget has a trailling \0 until we return; so remove the bits where we add one in between.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 022568572d..acab077958 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -609,7 +609,6 @@ PP(pp_formline)
if (targ_is_utf8 && !item_is_utf8) {
char *s;
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
- *t = '\0';
/* this is an unrolled sv_catpvn_utf8_upgrade(),
* but with the addition of s/~/ /g */
@@ -630,7 +629,6 @@ PP(pp_formline)
}
if (!targ_is_utf8 && item_is_utf8) {
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
- *t = '\0';
sv_utf8_upgrade_flags_grow(PL_formtarget, 0, fudge + 1);
t = SvEND(PL_formtarget);
targ_is_utf8 = TRUE;
@@ -816,7 +814,6 @@ PP(pp_formline)
if (item_is_utf8) {
if (!targ_is_utf8) {
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
- *t = '\0';
sv_utf8_upgrade_flags_grow(PL_formtarget, 0,
fudge + 1);
t = SvEND(PL_formtarget);
@@ -849,7 +846,6 @@ PP(pp_formline)
}
if (targ_is_utf8 && !item_is_utf8) {
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
- *t = '\0';
sv_catpvn_utf8_upgrade(PL_formtarget, s, arg, nsv);
for (; t < SvEND(PL_formtarget); t++) {
#ifdef EBCDIC