Code

quote.c: silence compiler warnings from EMIT macro
authorJeff King <peff@peff.net>
Wed, 28 Jun 2006 05:59:23 +0000 (01:59 -0400)
committerJunio C Hamano <junkio@cox.net>
Wed, 28 Jun 2006 08:18:18 +0000 (01:18 -0700)
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
quote.c

diff --git a/quote.c b/quote.c
index dcc23266109ce30e3fd098f3c76799b67b75a332..1910d000a5d288734aaea24da617481223ff9f56 100644 (file)
--- a/quote.c
+++ b/quote.c
@@ -13,7 +13,7 @@
  *  a!b      ==> a'\!'b    ==> 'a'\!'b'
  */
 #undef EMIT
-#define EMIT(x) ( (++len < n) && (*bp++ = (x)) )
+#define EMIT(x) do { if (++len < n) *bp++ = (x); } while(0)
 
 static inline int need_bs_quote(char c)
 {