[hackers] [st] Clarify calculation precedence for '&' and '?' || mvdan_AT_mvdan.cc

From: <git_AT_suckless.org>
Date: Mon, 27 Apr 2015 12:22:36 +0200 (CEST)

commit 4f21c41a1c19f769a2bf7941ee18fa0606266cca
Author: mvdan_AT_mvdan.cc <mvdan_AT_mvdan.cc>
Date: Wed Apr 22 15:08:00 2015 +0200

    Clarify calculation precedence for '&' and '?'
    
    Signed-off-by: Daniel Martí <mvdan_AT_mvdan.cc>

diff --git a/st.c b/st.c
index 6f8d83f..6c167b5 100644
--- a/st.c
+++ b/st.c
_AT_@ -855,9 +855,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 Mon Apr 27 2015 - 12:22:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 27 2015 - 12:24:23 CEST