[Devel] C's post-increment syntax does really fit here

Igor Podlesny openvz at poige.ru
Sun Apr 28 20:31:52 PDT 2013


---
 src/lib/util.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/util.c b/src/lib/util.c
index 17f618e..cc42d7e 100644
--- a/src/lib/util.c
+++ b/src/lib/util.c
@@ -53,8 +53,7 @@ static const char *unescapestr(char *const src)
 		if (*p2 == '\\' && !fl)	{
 			fl = 1;
 		} else {
-			*p1 = *p2;
-			p1++;
+			*p1++ = *p2;
 			fl = 0;
 		}
 		p2++;
-- 
1.7.9.5




More information about the Devel mailing list