diff options
author | Denis Vlasenko | 2007-01-19 21:33:19 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-19 21:33:19 +0000 |
commit | 4ebaf1074218d4e1c2907114bc53080c5abbd57d (patch) | |
tree | 8abee9b7a3ed71e5e224096246b9c43fee3b3e44 /editors | |
parent | 2405ad659e2596b17c88e7b950c086159d06cc6e (diff) | |
download | busybox-4ebaf1074218d4e1c2907114bc53080c5abbd57d.zip busybox-4ebaf1074218d4e1c2907114bc53080c5abbd57d.tar.gz |
strdup -> xstrdup
sed: de-obfuscate piece of code
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editors/sed.c b/editors/sed.c index 674381b..720d29a 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -175,12 +175,13 @@ static void parse_escapes(char *dest, char *string, int len, char from, char to) while (i < len) { if (string[i] == '\\') { if (!to || string[i+1] == from) { - *(dest++) = to ? to : string[i+1]; + *dest++ = to ? to : string[i+1]; i += 2; continue; - } else *(dest++) = string[i++]; + } + *dest++ = string[i++]; } - *(dest++) = string[i++]; + *dest++ = string[i++]; } *dest = 0; } |