[PATCH xf86-input-synaptics 2/2] Ensure history delta computations are signed

Chase Douglas chase.douglas at canonical.com
Tue Feb 7 13:07:08 PST 2012


Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 src/synaptics.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index a4c1e5a..106b5ee 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1791,7 +1791,7 @@ HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
 }
 
 #define HIST(a) (priv->move_hist[((priv->hist_index - (a) + SYNAPTICS_MOVE_HISTORY) % SYNAPTICS_MOVE_HISTORY)])
-#define HIST_DELTA(a, b, e) ((HIST((a)).e) - (HIST((b)).e))
+#define HIST_DELTA(a, b, e) ((int)((HIST((a)).e) - (HIST((b)).e)))
 
 static void
 store_history(SynapticsPrivate *priv, int x, int y, CARD32 millis)
-- 
1.7.8.3



More information about the xorg-devel mailing list