XI: drop extra temp variable in ProcXGetDeviceMotionEvents()
The value is only checked once, so no need to copy it to a temporary variable first. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
9ae97d7487
commit
e6df411cf5
|
@ -87,7 +87,7 @@ int
|
||||||
ProcXGetDeviceMotionEvents(ClientPtr client)
|
ProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
INT32 *coords = NULL;
|
INT32 *coords = NULL;
|
||||||
int rc, num_events, axes, size = 0;
|
int rc, axes, size = 0;
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
TimeStamp start, stop;
|
TimeStamp start, stop;
|
||||||
ValuatorClassPtr v;
|
ValuatorClassPtr v;
|
||||||
|
@ -124,8 +124,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
}
|
}
|
||||||
if (CompareTimeStamps(stop, currentTime) == LATER)
|
if (CompareTimeStamps(stop, currentTime) == LATER)
|
||||||
stop = currentTime;
|
stop = currentTime;
|
||||||
num_events = v->numMotionEvents;
|
if (v->numMotionEvents) {
|
||||||
if (num_events) {
|
|
||||||
size = sizeof(Time) + (axes * sizeof(INT32));
|
size = sizeof(Time) + (axes * sizeof(INT32));
|
||||||
rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords, /* XXX */
|
rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords, /* XXX */
|
||||||
start.milliseconds, stop.milliseconds,
|
start.milliseconds, stop.milliseconds,
|
||||||
|
|
Loading…
Reference in New Issue