diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-05 14:01:01 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-07 15:51:21 +1000 |
commit | 66925f068638c4cc3181478008e5a909de389940 (patch) | |
tree | 0464d2d80c4a85516a05982975d58014ba28fb71 | |
parent | 7ab2f8a74a4dc7b1f795490f3850129d43fdb3c8 (diff) |
ISDV4: swap packet parsing condition around.
No negative conditions where not nessary please.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Ping Cheng <pinglinux@gmail.com>
-rw-r--r-- | src/wcmISDV4.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c index 39cb2ac..dbc0c6a 100644 --- a/src/wcmISDV4.c +++ b/src/wcmISDV4.c @@ -794,10 +794,10 @@ static int isdv4Parse(InputInfoPtr pInfo, const unsigned char* data, int len) ds = &common->wcmChannel[channel].work; RESET_RELATIVE(*ds); - if (common->wcmPktLength != ISDV4_PKGLEN_TPCPEN) /* a touch */ - channel = isdv4ParseTouchPacket(pInfo, data, len, ds); - else + if (common->wcmPktLength == ISDV4_PKGLEN_TPCPEN) channel = isdv4ParsePenPacket(pInfo, data, len, ds); + else /* a touch */ + channel = isdv4ParseTouchPacket(pInfo, data, len, ds); if (channel < 0) return 0; |