[dev] [st] [PATCH] Clarify calculation precedence for '&' and '?'

From: Daniel Martí <mvdan_AT_mvdan.cc>
Date: Wed, 22 Apr 2015 14:45:26 +0200

Signed-off-by: Daniel Martí <mvdan_AT_mvdan.cc>
---
 st.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c
index d5bf8f1..57cb052 100644
--- a/st.c
+++ b/st.c
_AT_@ -859,9 +859,9 @@ mousereport(XEvent *e) {
 	}
 
 	if(!IS_SET(MODE_MOUSEX10)) {
-		button += (state & ShiftMask   ? 4  : 0)
-			+ (state & Mod4Mask    ? 8  : 0)
-			+ (state & ControlMask ? 16 : 0);
+		button += ((state & ShiftMask  ) ? 4  : 0)
+			+ ((state & Mod4Mask   ) ? 8  : 0)
+			+ ((state & ControlMask) ? 16 : 0);
 	}
 
 	len = 0;
Received on Wed Apr 22 2015 - 14:45:26 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 22 2015 - 15:12:17 CEST