summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-11-21 23:23:57 +0900
committertmk <nobody@nowhere>2013-11-21 23:23:57 +0900
commit4e5bce22deeee879d063f8e4fa8fe7aa087bd57e (patch)
treeb81680729eb53090da9a63812d936b18d26c3366
parent4e7ec43c3f52e7588807389d6f8e5fd810b36286 (diff)
Add parenthses ito macro arguments
-rw-r--r--common/action_code.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/action_code.h b/common/action_code.h
index c153838f2b..b08d36124e 100644
--- a/common/action_code.h
+++ b/common/action_code.h
@@ -207,10 +207,10 @@ enum mods_codes {
MODS_ONESHOT = 0x00,
};
#define ACTION_KEY(key) ACTION(ACT_MODS, (key))
-#define ACTION_MODS(mods) ACTION(ACT_MODS, (mods&0x1f)<<8 | 0)
-#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, (mods&0x1f)<<8 | (key))
-#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | (key))
-#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | MODS_ONESHOT)
+#define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | 0)
+#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | (key))
+#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | (key))
+#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_ONESHOT)
/*