From: Scott Warner Date: Thu, 7 Jan 2016 16:35:58 +0000 (-0500) Subject: Only log non-null invalid pointers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=refs%2Fheads%2Fstable%2Fcm-13.0-ZNH2K;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git Only log non-null invalid pointers This prevents the endless logspam of 0x0 pointers during animations such as an indeterminate progress dialog Change-Id: I986176800b2173a61e76a21af2caa47a728ba543 --- diff --git a/include/gralloc_priv.h b/include/gralloc_priv.h index 416101c..14ffd3f 100644 --- a/include/gralloc_priv.h +++ b/include/gralloc_priv.h @@ -153,7 +153,11 @@ struct private_handle_t { hnd->numInts + hnd->numFds != sNumInts + sNumFds || hnd->magic != sMagic) { - ALOGE("invalid gralloc handle (at %p)", reinterpret_cast(const_cast(h))); + void *handle = reinterpret_cast(const_cast(h)); + if(handle != 0) + { + ALOGE("invalid gralloc handle (at %p)", handle); + } return -EINVAL; } return 0;