mirror of
https://github.com/sheumann/hush.git
synced 2024-10-12 01:24:10 +00:00
hush: small code shrink
function old new delta expand_on_ifs 231 222 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
2bcba5cc53
commit
957f79f471
@ -4382,12 +4382,16 @@ static void o_addblock_duplicate_backslash(o_string *o, const char *str, int len
|
|||||||
{
|
{
|
||||||
while (--len >= 0) {
|
while (--len >= 0) {
|
||||||
char c = *str++;
|
char c = *str++;
|
||||||
|
|
||||||
#if ENABLE_HUSH_BRACE_EXPANSION
|
#if ENABLE_HUSH_BRACE_EXPANSION
|
||||||
if (c == '{' || c == '}') {
|
if (c == '{' || c == '}') {
|
||||||
/* { -> \{, } -> \} */
|
/* { -> \{, } -> \} */
|
||||||
o_addchr(o, '\\');
|
o_addchr(o, '\\');
|
||||||
o_addchr(o, c);
|
/* And now we want to add { or } and continue:
|
||||||
continue;
|
* o_addchr(o, c);
|
||||||
|
* continue;
|
||||||
|
* luckily, just falling throught achieves this.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
o_addchr(o, c);
|
o_addchr(o, c);
|
||||||
|
Loading…
Reference in New Issue
Block a user