From 6183eb72ec16ef36a31a9d92ad4268247a906ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Mon, 17 Nov 2014 21:09:14 +0100 Subject: [PATCH] Remove comparisons that can't be true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit keyBitmask and ledBitmask are arrays, "!their address" always evaluates to false. clang complains about this. Change-Id: I6aed45a203b0eeaad2093dbdebea03a2c2fc1a3d Signed-off-by: Bernhard Rosenkränzer --- services/inputflinger/EventHub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp index dfe5d3de6..7a77c305c 100644 --- a/services/inputflinger/EventHub.cpp +++ b/services/inputflinger/EventHub.cpp @@ -1443,7 +1443,7 @@ void EventHub::setLedForController(Device* device) { } bool EventHub::hasKeycodeLocked(Device* device, int keycode) const { - if (!device->keyMap.haveKeyLayout() || !device->keyBitmask) { + if (!device->keyMap.haveKeyLayout()) { return false; } @@ -1461,7 +1461,7 @@ bool EventHub::hasKeycodeLocked(Device* device, int keycode) const { } status_t EventHub::mapLed(Device* device, int32_t led, int32_t* outScanCode) const { - if (!device->keyMap.haveKeyLayout() || !device->ledBitmask) { + if (!device->keyMap.haveKeyLayout()) { return NAME_NOT_FOUND; }