aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-09-08 11:28:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-11 08:46:09 +1000
commit4bbf9c9125db51394870c86413fe18a0c8ec7068 (patch)
treeaefcb490c7b9fe9c960125b3c96c68486bf168d7
parentDe-duplicate event queue access. (diff)
downloadxf86-input-evdev-4bbf9c9125db51394870c86413fe18a0c8ec7068.tar.gz
xf86-input-evdev-4bbf9c9125db51394870c86413fe18a0c8ec7068.tar.bz2
xf86-input-evdev-4bbf9c9125db51394870c86413fe18a0c8ec7068.zip
Don't pass pointers around to first_v and num_v.
We only use them as values, no need for the addresses. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
-rw-r--r--src/evdev.c16
-rw-r--r--src/evdev.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/evdev.c b/src/evdev.c
index e5b3065..b634ab4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -612,13 +612,13 @@ EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev)
* Post the relative motion events.
*/
void
-EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
int v[MAX_VALUATORS])
{
EvdevPtr pEvdev = pInfo->private;
if (pEvdev->rel) {
- xf86PostMotionEventP(pInfo->dev, FALSE, *first_v, *num_v, v + *first_v);
+ xf86PostMotionEventP(pInfo->dev, FALSE, first_v, num_v, v + first_v);
}
}
@@ -626,7 +626,7 @@ EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
* Post the absolute motion events.
*/
void
-EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
int v[MAX_VALUATORS])
{
EvdevPtr pEvdev = pInfo->private;
@@ -641,14 +641,14 @@ EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
* just work.
*/
if (pEvdev->abs && pEvdev->tool) {
- xf86PostMotionEventP(pInfo->dev, TRUE, *first_v, *num_v, v);
+ xf86PostMotionEventP(pInfo->dev, TRUE, first_v, num_v, v);
}
}
/**
* Post the queued key/button events.
*/
-static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
int v[MAX_VALUATORS])
{
int i;
@@ -684,9 +684,9 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
EvdevProcessValuators(pInfo, v, &num_v, &first_v);
- EvdevPostRelativeMotionEvents(pInfo, &num_v, &first_v, v);
- EvdevPostAbsoluteMotionEvents(pInfo, &num_v, &first_v, v);
- EvdevPostQueuedEvents(pInfo, &num_v, &first_v, v);
+ EvdevPostRelativeMotionEvents(pInfo, num_v, first_v, v);
+ EvdevPostAbsoluteMotionEvents(pInfo, num_v, first_v, v);
+ EvdevPostQueuedEvents(pInfo, num_v, first_v, v);
memset(pEvdev->delta, 0, sizeof(pEvdev->delta));
memset(pEvdev->queue, 0, sizeof(pEvdev->queue));
diff --git a/src/evdev.h b/src/evdev.h
index 4945140..ce7f5f8 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -200,9 +200,9 @@ void EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
void EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value);
void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value);
void EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count);
-void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
int v[MAX_VALUATORS]);
-void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
int v[MAX_VALUATORS]);
unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);