hush: small code shrink
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Oct 2010 15:15:50 +0000 (17:15 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Oct 2010 15:15:50 +0000 (17:15 +0200)
function                                             old     new   delta
expand_on_ifs                                        231     222      -9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c

index 5b73f0c53e862aea70f8f510c9dbbe7b1058daa4..67a6d87f5441a978d46951572f37791d175d98bc 100644 (file)
@@ -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);