summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2006-06-28 05:59:23 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-28 08:18:18 (GMT)
commit8dcaefb52f81115d71e1dfa27d45f4a677bcbc09 (patch)
tree7ca6f86c6c90633f78401960b9ee6545afbfd9cf
parent8096fae7269e7b3882394100151bc017446b01a1 (diff)
downloadgit-8dcaefb52f81115d71e1dfa27d45f4a677bcbc09.zip
git-8dcaefb52f81115d71e1dfa27d45f4a677bcbc09.tar.gz
git-8dcaefb52f81115d71e1dfa27d45f4a677bcbc09.tar.bz2
quote.c: silence compiler warnings from EMIT macro
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--quote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quote.c b/quote.c
index dcc2326..1910d00 100644
--- 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)
{