diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2010-11-20 14:14:52 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2010-11-20 14:14:52 +0000 |
commit | aeb5d065044ee6733a7fee14edb52959a28c1ab4 (patch) | |
tree | bb660239ff9ba03cd107817f9d8d00fabdba49a1 /bin/sh/eval.c | |
parent | 8987b01ea9c92618bc12d80b444807a9954ea51e (diff) | |
download | src-aeb5d065044ee6733a7fee14edb52959a28c1ab4.tar.gz src-aeb5d065044ee6733a7fee14edb52959a28c1ab4.zip |
sh: Code size optimizations to buffered output.
This is mainly less use of the outc macro.
No functional change is intended, but code size is about 2K less on i386.
Notes
Notes:
svn path=/head/; revision=215567
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r-- | bin/sh/eval.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 415b9eba0120..c306e731f316 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -699,13 +699,13 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd) for (sp = varlist.list ; sp ; sp = sp->next) { if (sep != 0) out2c(' '); - p = sp->text; - while (*p != '=' && *p != '\0') - out2c(*p++); - if (*p != '\0') { - out2c(*p++); + p = strchr(sp->text, '='); + if (p != NULL) { + p++; + outbin(sp->text, p - sp->text, out2); out2qstr(p); - } + } else + out2qstr(sp->text); sep = ' '; } for (sp = arglist.list ; sp ; sp = sp->next) { |