From 4ebaf1074218d4e1c2907114bc53080c5abbd57d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 19 Jan 2007 21:33:19 +0000 Subject: strdup -> xstrdup sed: de-obfuscate piece of code --- editors/sed.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'editors') diff --git a/editors/sed.c b/editors/sed.c index 674381b56..720d29aed 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; } -- cgit v1.2.3