From 256ef5c8bbc9dcf29f1babbf46f215f5d73e3323 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Tue, 4 Dec 2012 00:06:41 +0100 Subject: [PATCH] Put memset because min/max set. --- map.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/map.c b/map.c index fd34eaa..f1e493c 100644 --- a/map.c +++ b/map.c @@ -102,6 +102,10 @@ int main(int argc, char** argv) { return 1; } + + /* Memset because we are already setting the absmax/absmin */ + memset(&uidev, '\0', sizeof(struct uinput_user_dev)); + for(j = 0; j < 2; j++) { js[j] = open(UINPUT_PATH, O_WRONLY | O_NONBLOCK); if (js[j] < 0) { @@ -143,7 +147,6 @@ int main(int argc, char** argv) { /* Allocate device info */ - memset(&uidev, '\0', sizeof(struct uinput_user_dev)); snprintf(uidev.name, UINPUT_MAX_NAME_SIZE, "key2joy:1"); uidev.id.bustype = BUS_USB;