summaryrefslogtreecommitdiff
path: root/debuggerd/handler/debuggerd_fallback.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2019-03-25 14:55:39 -0700
committerJosh Gao <jmgao@google.com>2019-03-25 16:41:39 -0700
commitc6ad69d1d467580455aacc2399e155610f76def6 (patch)
tree9deabc9d769f312bbcc5b135e5b523210a4573f2 /debuggerd/handler/debuggerd_fallback.cpp
parent8a5a918ef836d6df353b6644f921ad81536b0c35 (diff)
liblog: don't return 0xFFFFFFFF as an invalid log id.
There are a bunch of branches that check "id >= LOG_ID_MAX", but because C++ hates you, this does a promotion to signed int despite the fact that both sides of the comparison are the same enum with an underlying type of unsigned int. (C++17 ยง7.6.3) Return LOG_ID_MAX instead of a value that gets promoted to signed -1, to avoid this. Bug: http://b/129272512 Test: /data/nativetest64/logcat-unit-tests/logcat-unit-tests Change-Id: I4b3ee662d76d5cc80d9a9625d17f7e5b5980de41
Diffstat (limited to 'debuggerd/handler/debuggerd_fallback.cpp')
0 files changed, 0 insertions, 0 deletions