diff options
author | Denys Vlasenko | 2010-10-03 17:15:50 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-10-03 17:15:50 +0200 |
commit | 957f79f4714fbb0ee7d653d98609054f2a8d7545 (patch) | |
tree | e66739dc1f8218019fcfc82ee1ff4ea1ade8c2ec | |
parent | 2bcba5cc53a171fba2d9d0b5185f45d8026a2657 (diff) | |
download | busybox-957f79f4714fbb0ee7d653d98609054f2a8d7545.zip busybox-957f79f4714fbb0ee7d653d98609054f2a8d7545.tar.gz |
hush: small code shrink
function old new delta
expand_on_ifs 231 222 -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/hush.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index 5b73f0c..67a6d87 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 { while (--len >= 0) { char c = *str++; + #if ENABLE_HUSH_BRACE_EXPANSION if (c == '{' || c == '}') { /* { -> \{, } -> \} */ o_addchr(o, '\\'); - o_addchr(o, c); - continue; + /* And now we want to add { or } and continue: + * o_addchr(o, c); + * continue; + * luckily, just falling throught achieves this. + */ } #endif o_addchr(o, c); |