quote.c: silence compiler warnings from EMIT macro
PATCH 1/1 quote.c: silence compiler warnings from EMIT macro
Signed-off-by Jeff King <[email protected]>
---
This allows compiling with gcc -Wall -Werror, which makes finding useful warnings easier. I also think the 'if' is easier to read than the short-circuit.
quote.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
quote.c +1 -1
@@ -13,7 +13,7 @@ #include "quote.h"* 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) {
Signature · 1 line
1.4.1.rc1.g29f4a-dirty
Thanks.