liblog: fix errno issues with event tag map

Cleanup.

Save the errno for the calls that fail, and reinstate them for
return. Drop fprintf stutter, one succinct line. Solve a memory
leak in close.  Change android_lookupEventTag() to use an
unsigned int so that we can use the full range of uint32_t tags.

Make sure this file compiles clean in C++.

Test: gTest liblog-unit-tests
Bug: 30963384
Bug: 31456426
Change-Id: I6a5efa6fb7e991431caba75ef0971e111968f6bf
1 file changed
tree: c8f9c527e06f07ba760995db7766ff49302ae404
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/