aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-10-03 17:15:50 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-10-03 17:15:50 +0200
commit957f79f4714fbb0ee7d653d98609054f2a8d7545 (patch)
treee66739dc1f8218019fcfc82ee1ff4ea1ade8c2ec /shell/hush.c
parent2bcba5cc53a171fba2d9d0b5185f45d8026a2657 (diff)
downloadbusybox-w32-957f79f4714fbb0ee7d653d98609054f2a8d7545.tar.gz
busybox-w32-957f79f4714fbb0ee7d653d98609054f2a8d7545.tar.bz2
busybox-w32-957f79f4714fbb0ee7d653d98609054f2a8d7545.zip
hush: small code shrink
function old new delta expand_on_ifs 231 222 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 5b73f0c53..67a6d87f5 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -4382,12 +4382,16 @@ static void o_addblock_duplicate_backslash(o_string *o, const char *str, int len
4382{ 4382{
4383 while (--len >= 0) { 4383 while (--len >= 0) {
4384 char c = *str++; 4384 char c = *str++;
4385
4385#if ENABLE_HUSH_BRACE_EXPANSION 4386#if ENABLE_HUSH_BRACE_EXPANSION
4386 if (c == '{' || c == '}') { 4387 if (c == '{' || c == '}') {
4387 /* { -> \{, } -> \} */ 4388 /* { -> \{, } -> \} */
4388 o_addchr(o, '\\'); 4389 o_addchr(o, '\\');
4389 o_addchr(o, c); 4390 /* And now we want to add { or } and continue:
4390 continue; 4391 * o_addchr(o, c);
4392 * continue;
4393 * luckily, just falling throught achieves this.
4394 */
4391 } 4395 }
4392#endif 4396#endif
4393 o_addchr(o, c); 4397 o_addchr(o, c);