diff options
author | Stephen Hines <srhines@google.com> | 2017-01-23 17:22:47 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2017-01-23 17:26:30 -0800 |
commit | b45857ebc5cc15c8920be6b9b0c2c70e0707572c (patch) | |
tree | c1f86185185ccd6053cb9c64465dba6eb5751c66 /memtrack | |
parent | 13387baf267a4f74996c7172f8178fb6d4eb0a52 (diff) | |
download | android_hardware_interfaces-b45857ebc5cc15c8920be6b9b0c2c70e0707572c.tar.gz android_hardware_interfaces-b45857ebc5cc15c8920be6b9b0c2c70e0707572c.tar.bz2 android_hardware_interfaces-b45857ebc5cc15c8920be6b9b0c2c70e0707572c.zip |
Fix some ordered comparisons with zero for pointers.
Bug: http://b/31532493
The latest clang will trigger an error diagnostic "ordered comparison
between pointer and zero ..." when you do something like "p > 0". This
change replaces the ordered comparisons with proper checks instead.
Test: Validated with latest toolchain.
Change-Id: I4a127fe2551688c8176bdd31210cf7f2f40baeba
Diffstat (limited to 'memtrack')
-rw-r--r-- | memtrack/1.0/default/Memtrack.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/memtrack/1.0/default/Memtrack.cpp b/memtrack/1.0/default/Memtrack.cpp index 5c1a5c453..fa09c25ef 100644 --- a/memtrack/1.0/default/Memtrack.cpp +++ b/memtrack/1.0/default/Memtrack.cpp @@ -79,7 +79,7 @@ IMemtrack* HIDL_FETCH_IMemtrack(const char* name) { memtrack_module_t *memtrack_module = NULL; ret = hw_get_module(name, &hw_module); - if (ret == 0 && hw_module->methods->open > 0) + if (ret == 0 && hw_module->methods->open) { ret = hw_module->methods->open(hw_module, name, reinterpret_cast<hw_device_t**>(&memtrack_module)); |