[PATCH evtest 2/9] Define SYN_MAX instead of a hardcoded value

Peter Hutterer peter.hutterer at who-t.net
Wed Aug 21 20:46:47 PDT 2013


This is a bump from the previous one since current kernels have SYN_DROPPED
of 3 - might as well update to this value.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 evtest.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/evtest.c b/evtest.c
index af8ff98..43b5169 100644
--- a/evtest.c
+++ b/evtest.c
@@ -69,6 +69,8 @@
 #ifndef EV_SYN
 #define EV_SYN 0
 #endif
+#define SYN_MAX 3
+#define SYN_CNT (SYN_MAX + 1)
 #ifndef SYN_MT_REPORT
 #define SYN_MT_REPORT 2
 #endif
@@ -525,7 +527,8 @@ static const char * const sounds[SND_MAX + 1] = {
 	NAME_ELEMENT(SND_TONE)
 };
 
-static const char * const syns[3] = {
+static const char * const syns[SYN_MAX + 1] = {
+	[0 ... SYN_MAX] = NULL,
 	NAME_ELEMENT(SYN_REPORT),
 	NAME_ELEMENT(SYN_CONFIG),
 	NAME_ELEMENT(SYN_MT_REPORT)
-- 
1.8.2.1



More information about the Input-tools mailing list