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
2 files changed
tree: cb27b2cccccc22c922bcd975892474df04dd5345
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/