[PATCH:xf86-input-keyboard 22/23] Do not assume type in WS_*_MAP_SIZE macros.
Thomas Klausner
wiz at NetBSD.org
Mon Jul 29 14:23:48 PDT 2013
Suggested by Walter Harms <wharms at bfs.de>.
Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb at laas.fr>
---
src/bsd_KbdMap.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c
index 8016a25..06f5b0e 100644
--- a/src/bsd_KbdMap.c
+++ b/src/bsd_KbdMap.c
@@ -443,7 +443,7 @@ static CARD8 wsUsbMap[] = {
/* 230 */ KEY_AltLang, /* Right Alt, AKA AltGr */
/* 231 */ KEY_LMeta, /* Right Meta XXX */
};
-#define WS_USB_MAP_SIZE (sizeof(wsUsbMap)/sizeof(unsigned char))
+#define WS_USB_MAP_SIZE (sizeof(wsUsbMap)/sizeof(*wsUsbMap))
static
TransMapRec wsUsb = {
@@ -676,7 +676,7 @@ static CARD8 wsXtMap[] = {
/* 220 */ KEY_RMeta,
/* 221 */ KEY_Menu,
};
-#define WS_XT_MAP_SIZE (sizeof(wsXtMap)/sizeof(unsigned char))
+#define WS_XT_MAP_SIZE (sizeof(wsXtMap)/sizeof(*wsXtMap))
static
TransMapRec wsXt = {
@@ -816,7 +816,7 @@ static CARD8 wsAdbMap[] = {
/* 126 */ KEY_NOTUSED,
/* 127 */ KEY_Power
};
-#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(unsigned char))
+#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(*wsAdbMap))
static
TransMapRec wsAdb = {
@@ -1080,7 +1080,7 @@ static CARD8 wsLk201Map[] = {
/* 250 */ KEY_NOTUSED,
/* 251 */ KEY_NOTUSED,
};
-#define WS_LK201_MAP_SIZE (sizeof(wsLk201Map)/sizeof(unsigned char))
+#define WS_LK201_MAP_SIZE (sizeof(wsLk201Map)/sizeof(*wsLk201Map))
static
TransMapRec wsLk201 = {
@@ -1219,7 +1219,7 @@ static CARD8 wsSunMap[] = {
/* 0x7e */ KEY_NOTUSED,
/* 0x7f */ KEY_NOTUSED
};
-#define WS_SUN_MAP_SIZE (sizeof(wsSunMap)/sizeof(unsigned char))
+#define WS_SUN_MAP_SIZE (sizeof(wsSunMap)/sizeof(*wsSunMap))
static
TransMapRec wsSun = {
--
1.8.3.3
More information about the xorg-devel
mailing list