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 dcc2326..1910d00 100644 (file)
--- a/quote.c
+++ b/quote.c
@@ -13,7 +13,7 @@
  *  a!b      ==> a'\!'b    ==> 'a'\!'b'
  */
 #undef EMIT
  *  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)
 {
 
 static inline int need_bs_quote(char c)
 {