Merge "logcat: Add missing newline to read failure"
am: 556ca0cb2a

Change-Id: I899e173ce3018435507a6fa1f6e9ca4782eec342
diff --git a/liblog/Android.bp b/liblog/Android.bp
index b98d18f..e74aa82 100644
--- a/liblog/Android.bp
+++ b/liblog/Android.bp
@@ -42,24 +42,6 @@
     "logd_writer.c",
 ]
 
-cc_library_headers {
-    name: "liblog_headers",
-    host_supported: true,
-    vendor_available: true,
-    export_include_dirs: ["include"],
-    target: {
-        windows: {
-            enabled: true,
-        },
-        linux_bionic: {
-            enabled: true,
-        },
-        vendor: {
-            export_include_dirs: ["include_vndk"],
-        },
-    },
-}
-
 // Shared and static library for host and device
 // ========================================================
 cc_library {
@@ -99,8 +81,7 @@
         },
     },
 
-    header_libs: ["liblog_headers"],
-    export_header_lib_headers: ["liblog_headers"],
+    export_include_dirs: ["include"],
 
     cflags: [
         "-Werror",
@@ -119,7 +100,7 @@
 }
 
 ndk_headers {
-    name: "liblog_ndk_headers",
+    name: "liblog_headers",
     from: "include/android",
     to: "android",
     srcs: ["include/android/log.h"],
diff --git a/liblog/tests/AndroidTest.xml b/liblog/tests/AndroidTest.xml
index b8d87e6..427f2b4 100644
--- a/liblog/tests/AndroidTest.xml
+++ b/liblog/tests/AndroidTest.xml
@@ -14,6 +14,7 @@
      limitations under the License.
 -->
 <configuration description="Config for CTS Logging Library test cases">
+    <option name="config-descriptor:metadata" key="component" value="systems" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
         <option name="cleanup" value="true" />
         <option name="push" value="CtsLiblogTestCases->/data/local/tmp/CtsLiblogTestCases" />
diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp
index 76a4aff..7498325 100644
--- a/logd/LogBuffer.cpp
+++ b/logd/LogBuffer.cpp
@@ -165,15 +165,17 @@
             (lenl == sizeof(android_log_event_int_t)) &&
             !fastcmp<memcmp>(msgl, msgr, sizeof(android_log_event_int_t) -
                                              sizeof(int32_t)) &&
-            (elem->getTag() == LIBLOG_LOG_TAG))
+            (elem->getTag() == LIBLOG_LOG_TAG)) {
             return SAME_LIBLOG;
+        }
     }
 
     // audit message (except sequence number) identical?
     if (last->isBinary()) {
         if (fastcmp<memcmp>(msgl, msgr, sizeof(android_log_event_string_t) -
-                                            sizeof(int32_t)))
+                                            sizeof(int32_t))) {
             return DIFFERENT;
+        }
         msgl += sizeof(android_log_event_string_t);
         lenl -= sizeof(android_log_event_string_t);
         msgr += sizeof(android_log_event_string_t);