diff options
author | jilles <jilles@FreeBSD.org> | 2010-04-25 20:43:19 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-04-25 20:43:19 +0000 |
commit | 88403fad183ba6067547daa0d779c87bf100403f (patch) | |
tree | 0d483cc468eee9850434c86361d24e23e247d468 /bin/sh/arith.y | |
parent | 019a1d16bacaa7783b857c309ce61d655e899904 (diff) | |
download | FreeBSD-src-88403fad183ba6067547daa0d779c87bf100403f.zip FreeBSD-src-88403fad183ba6067547daa0d779c87bf100403f.tar.gz |
sh: Use stalloc for arith variable names.
This is simpler than the custom memory tracker I added earlier, and is also
needed by the dash arith code I plan to import.
Diffstat (limited to 'bin/sh/arith.y')
-rw-r--r-- | bin/sh/arith.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/sh/arith.y b/bin/sh/arith.y index 5db1633..28046ba 100644 --- a/bin/sh/arith.y +++ b/bin/sh/arith.y @@ -287,7 +287,9 @@ arith_t arith(const char *s) { arith_t result; + struct stackmark smark; + setstackmark(&smark); arith_buf = arith_startbuf = s; INTOFF; @@ -295,6 +297,8 @@ arith(const char *s) arith_lex_reset(); /* Reprime lex. */ INTON; + popstackmark(&smark); + return result; } |