]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Add parenthses ito macro arguments
authortmk <nobody@nowhere>
Thu, 21 Nov 2013 14:23:57 +0000 (23:23 +0900)
committertmk <nobody@nowhere>
Thu, 21 Nov 2013 14:23:57 +0000 (23:23 +0900)
common/action_code.h

index c153838f2baf6fc351f10b43c6bdaa3c09483267..b08d36124e5b06d4b881bb43bd7fbd97910e808b 100644 (file)
@@ -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)
 
 
 /*