[hackers] [PATCH][libgrapheme] macro-hygiene: wrap arguments in parenthesis

From: NRK <nrk_AT_disroot.org>
Date: Wed, 29 Jun 2022 09:07:49 +0600

reported by clang-tidy.
---
 src/utf8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utf8.c b/src/utf8.c
index 3584c61..46db763 100644
--- a/src/utf8.c
+++ b/src/utf8.c
_AT_@ -4,7 +4,7 @@
 #include "../grapheme.h"
 #include "util.h"
 
-#define BETWEEN(c, l, u) (c >= l && c <= u)
+#define BETWEEN(c, l, u) ((c) >= (l) && (c) <= (u))
 
 /* lookup-table for the types of sequence first bytes */
 static const struct {
-- 
2.35.1
Received on Wed Jun 29 2022 - 05:07:49 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 29 2022 - 05:12:28 CEST