From 9c2cb9b0ea6b26e617a293f6dba2ff54bd7c047b Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Mon, 23 Sep 2013 15:39:16 +0200 Subject: hexdump: rewrite escape() Signed-off-by: Ondrej Oprala --- text-utils/parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'text-utils/parse.c') diff --git a/text-utils/parse.c b/text-utils/parse.c index 657f15727..90c600375 100644 --- a/text-utils/parse.c +++ b/text-utils/parse.c @@ -471,7 +471,8 @@ static void escape(char *p1) char *p2; /* alphabetic escape sequences have to be done in place */ - for (p2 = p1;; ++p1, ++p2) { + p2 = p1; + while (TRUE) { if (!*p1) { *p2 = *p1; break; @@ -504,6 +505,7 @@ static void escape(char *p1) *p2 = *p1; break; } + ++p1; ++p2; } } -- cgit v1.2.3-55-g7522