Code

upload-pack: use object pointer not copy of sha1 to keep track of has/needs.
[git.git] / 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)
 {