Fix warnings
[tig] / tig.c
diff --git a/tig.c b/tig.c
index f68991c..78e8851 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -180,7 +180,7 @@ sq_quote(char buf[SIZEOF_CMD], size_t bufsize, const char *src)
 {
        char c;
 
-#define BUFPUT(x) ( (bufsize < SIZEOF_CMD) && (buf[bufsize++] = (x)) )
+#define BUFPUT(x) do { if (bufsize < SIZEOF_CMD) buf[bufsize++] = (x); } while (0)
 
        BUFPUT('\'');
        while ((c = *src++)) {