summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-07-27 10:36:57 -0700
committerChih-Hung Hsieh <chh@google.com>2018-07-27 10:36:57 -0700
commitcbdfa7a845accc8d1e7d935b9007f503d8d77180 (patch)
tree92b6ddf26575acde132a71b1cfacf9bf5a62dfad
parent1167d55e6c8dc176126502868b8e0778aaf58eaa (diff)
downloadlibhidl-cbdfa7a845accc8d1e7d935b9007f503d8d77180.tar.gz
Fix undefined error in LOG_ALWAYS_FATAL_IF.
Found by static analyzer. New LOG_ALWAYS_FATAL_IF definition checks its arguments. Bug: 111850071 Test: build with WTIH_TIDY=1 Change-Id: I6056cc38f76d022b4cf7660901903b33770abd79
-rw-r--r--libhidlcache/MemoryDealer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhidlcache/MemoryDealer.cpp b/libhidlcache/MemoryDealer.cpp
index dea7bc7..e0e18c7 100644
--- a/libhidlcache/MemoryDealer.cpp
+++ b/libhidlcache/MemoryDealer.cpp
@@ -123,7 +123,7 @@ SimpleBestFitAllocator::~SimpleBestFitAllocator() {
// and generates a false positive warning about accessing
// memory that is already freed.
// Add an "assert" to avoid the confusion.
- LOG_ALWAYS_FATAL_IF(mList.head() == removed);
+ LOG_ALWAYS_FATAL_IF(mList.front() == removed);
#endif
delete removed;
}