diff options
-rw-r--r-- | test/eventcomm-test.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/eventcomm-test.c b/test/eventcomm-test.c index 677c960..5cf2639 100644 --- a/test/eventcomm-test.c +++ b/test/eventcomm-test.c @@ -29,6 +29,8 @@ #endif #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <assert.h> #include "synapticsstr.h" @@ -74,9 +76,8 @@ write_event(int fd, struct input_event *ev, int n) } static void -test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm) +test_buttons(int fd, SynapticsPrivate *priv, struct CommData *comm) { - SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; struct SynapticsHwState *hw = NULL; struct input_event ev = { {0, 0}, EV_KEY, 0, 0 }; @@ -118,7 +119,6 @@ test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm) static void test_read_hw_state(void) { - InputInfoRec info = { 0 }; SynapticsPrivate private; struct SynapticsHwState *hw = NULL; struct CommData comm = { 0 }; @@ -135,8 +135,6 @@ test_read_hw_state(void) memset(&private, 0, sizeof(private)); - info.private = &private; - info.fd = fd_read; private.fd = fd_read; private.proto_data = EventProtoDataAlloc(); @@ -185,7 +183,7 @@ test_read_hw_state(void) assert(hw->fingerWidth == ev[6].value); /* the various buttons */ - test_buttons(fd_write, &info, &comm); + test_buttons(fd_write, &private, &comm); free(private.proto_data); SynapticsHwStateFree(&hw); @@ -226,7 +224,6 @@ static void test_ignore_hw_state(void) { int i; - InputInfoRec info = { 0 }; SynapticsPrivate private; struct SynapticsHwState *hw = NULL; struct SynapticsHwState *hw_zero = NULL; @@ -262,8 +259,6 @@ test_ignore_hw_state(void) struct input_event ev = { {0, 0}, 0, 0, 1 }; memset(&private, 0, sizeof(private)); - info.private = &private; - info.fd = fd_read; private.fd = fd_read; private.proto_data = EventProtoDataAlloc(); |