summaryrefslogtreecommitdiffstats
path: root/quote.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2006-06-28 07:59:23 +0200
committerJunio C Hamano <junkio@cox.net>2006-06-28 10:18:18 +0200
commit8dcaefb52f81115d71e1dfa27d45f4a677bcbc09 (patch)
tree7ca6f86c6c90633f78401960b9ee6545afbfd9cf /quote.c
parentFix expr usage for FreeBSD (diff)
downloadgit-8dcaefb52f81115d71e1dfa27d45f4a677bcbc09.tar.xz
git-8dcaefb52f81115d71e1dfa27d45f4a677bcbc09.zip
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>
Diffstat (limited to '')
-rw-r--r--quote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quote.c b/quote.c
index dcc2326610..1910d000a5 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)
{