aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-19 21:33:19 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-19 21:33:19 +0000
commitc89a142e47f056a0f5dfc73bbbec3252ccbeefb0 (patch)
tree8abee9b7a3ed71e5e224096246b9c43fee3b3e44 /editors
parentf772075e79d2493702a212124b8701cf265e067d (diff)
downloadbusybox-w32-c89a142e47f056a0f5dfc73bbbec3252ccbeefb0.tar.gz
busybox-w32-c89a142e47f056a0f5dfc73bbbec3252ccbeefb0.tar.bz2
busybox-w32-c89a142e47f056a0f5dfc73bbbec3252ccbeefb0.zip
strdup -> xstrdup
sed: de-obfuscate piece of code git-svn-id: svn://busybox.net/trunk/busybox@17392 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c7
1 files changed, 4 insertions, 3 deletions
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)
175 while (i < len) { 175 while (i < len) {
176 if (string[i] == '\\') { 176 if (string[i] == '\\') {
177 if (!to || string[i+1] == from) { 177 if (!to || string[i+1] == from) {
178 *(dest++) = to ? to : string[i+1]; 178 *dest++ = to ? to : string[i+1];
179 i += 2; 179 i += 2;
180 continue; 180 continue;
181 } else *(dest++) = string[i++]; 181 }
182 *dest++ = string[i++];
182 } 183 }
183 *(dest++) = string[i++]; 184 *dest++ = string[i++];
184 } 185 }
185 *dest = 0; 186 *dest = 0;
186} 187}