summaryrefslogtreecommitdiffstats
path: root/wear_touch.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-08-26 23:54:29 +0200
committerChih-Hung Hsieh <chh@google.com>2016-08-26 23:54:29 +0200
commit8b23811d2ac5c056ff49f2ab4fca3447a9fdca42 (patch)
treeb2d9b2cab10667fdd08f2de84db84dc86845477a /wear_touch.cpp
parentMerge "Free mmaped area if keys fail to load" (diff)
downloadandroid_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.tar
android_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.tar.gz
android_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.tar.bz2
android_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.tar.lz
android_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.tar.xz
android_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.tar.zst
android_bootable_recovery-8b23811d2ac5c056ff49f2ab4fca3447a9fdca42.zip
Diffstat (limited to '')
-rw-r--r--wear_touch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/wear_touch.cpp b/wear_touch.cpp
index f22d40b88..51a1d31b2 100644
--- a/wear_touch.cpp
+++ b/wear_touch.cpp
@@ -122,7 +122,7 @@ void* WearSwipeDetector::touch_thread(void* cookie) {
return NULL;
}
-#define test_bit(bit, array) (array[bit/8] & (1<<(bit%8)))
+#define test_bit(bit, array) ((array)[(bit)/8] & (1<<((bit)%8)))
int WearSwipeDetector::openDevice(const char *device) {
int fd = open(device, O_RDONLY);