From: Ondrej Oprala Date: Mon, 23 Sep 2013 13:39:16 +0000 (+0200) Subject: hexdump: rewrite escape() X-Git-Tag: v2.25-rc1~764 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c2cb9b0ea6b26e617a293f6dba2ff54bd7c047b;p=thirdparty%2Futil-linux.git hexdump: rewrite escape() Signed-off-by: Ondrej Oprala --- diff --git a/text-utils/parse.c b/text-utils/parse.c index 657f15727c..90c6003751 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; } }