summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-11-04 23:48:53 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-11-04 23:48:53 +0000
commit379c4362c2261464f61a477ba8cb859a7054e261 (patch)
tree320fb2d0a0dffca574f8e20adb4abbb3eedcf320 /mg.c
parentde616352556f5da70790ceef0ca8b92726d7761a (diff)
downloadperl-379c4362c2261464f61a477ba8cb859a7054e261.tar.gz
indeterminate order-of-evaluation fixes
p4raw-id: //depot/perl@2192
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mg.c b/mg.c
index 743ee4a528..6b5cb4faa8 100644
--- a/mg.c
+++ b/mg.c
@@ -1949,7 +1949,10 @@ magic_set(SV *sv, MAGIC *mg)
|| PL_origargv[i] == s + 2
#endif
)
- s += strlen(++s); /* this one is ok too */
+ {
+ ++s;
+ s += strlen(s); /* this one is ok too */
+ }
else
break;
}
@@ -1962,8 +1965,10 @@ magic_set(SV *sv, MAGIC *mg)
my_setenv("NoNe SuCh", Nullch);
/* force copy of environment */
for (i = 0; PL_origenviron[i]; i++)
- if (PL_origenviron[i] == s + 1)
- s += strlen(++s);
+ if (PL_origenviron[i] == s + 1) {
+ ++s;
+ s += strlen(s);
+ }
else
break;
}