diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-10 21:27:13 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-10 21:27:13 +0100 |
| commit | 46a14771078744751ffa2bdb840c1bb4b005241c (patch) | |
| tree | 20835580439d93ce1bf95260b91b147e6e038cf7 /shell | |
| parent | 11a802a0fa04627110809d908c588aa2c471d5aa (diff) | |
| download | busybox-w32-46a14771078744751ffa2bdb840c1bb4b005241c.tar.gz busybox-w32-46a14771078744751ffa2bdb840c1bb4b005241c.tar.bz2 busybox-w32-46a14771078744751ffa2bdb840c1bb4b005241c.zip | |
ash: trivial optimization -6 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 023294cbb..8d7c4ca75 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -4213,15 +4213,16 @@ cmdputs(const char *s) | |||
| 4213 | }; | 4213 | }; |
| 4214 | 4214 | ||
| 4215 | const char *p, *str; | 4215 | const char *p, *str; |
| 4216 | char cc[2] = " "; | 4216 | char cc[2]; |
| 4217 | char *nextc; | 4217 | char *nextc; |
| 4218 | unsigned char c; | 4218 | unsigned char c; |
| 4219 | unsigned char subtype = 0; | 4219 | unsigned char subtype = 0; |
| 4220 | int quoted = 0; | 4220 | int quoted = 0; |
| 4221 | 4221 | ||
| 4222 | cc[1] = '\0'; | ||
| 4222 | nextc = makestrspace((strlen(s) + 1) * 8, cmdnextc); | 4223 | nextc = makestrspace((strlen(s) + 1) * 8, cmdnextc); |
| 4223 | p = s; | 4224 | p = s; |
| 4224 | while ((c = *p++) != 0) { | 4225 | while ((c = *p++) != '\0') { |
| 4225 | str = NULL; | 4226 | str = NULL; |
| 4226 | switch (c) { | 4227 | switch (c) { |
| 4227 | case CTLESC: | 4228 | case CTLESC: |
| @@ -4292,7 +4293,8 @@ cmdputs(const char *s) | |||
| 4292 | while ((c = *str++) != '\0') { | 4293 | while ((c = *str++) != '\0') { |
| 4293 | USTPUTC(c, nextc); | 4294 | USTPUTC(c, nextc); |
| 4294 | } | 4295 | } |
| 4295 | } | 4296 | } /* while *p++ not NUL */ |
| 4297 | |||
| 4296 | if (quoted & 1) { | 4298 | if (quoted & 1) { |
| 4297 | USTPUTC('"', nextc); | 4299 | USTPUTC('"', nextc); |
| 4298 | } | 4300 | } |
