Merge "<cutils/atomic.h> has been inlined for two years now."
diff --git a/liblog/pmsg_reader.c b/liblog/pmsg_reader.c
index f5e91c8..2e4fc5d 100644
--- a/liblog/pmsg_reader.c
+++ b/liblog/pmsg_reader.c
@@ -227,7 +227,7 @@
log_msg->entry_v4.uid = buf.p.uid;
}
- return ret;
+ return ret + log_msg->entry_v4.hdr_size;
}
}
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp
index 7f21375..33d5b62 100644
--- a/libnativeloader/native_loader.cpp
+++ b/libnativeloader/native_loader.cpp
@@ -54,7 +54,12 @@
bool is_shared,
jstring java_library_path,
jstring java_permitted_path) {
- ScopedUtfChars library_path(env, java_library_path);
+ std::string library_path; // empty string by default.
+
+ if (java_library_path != nullptr) {
+ ScopedUtfChars library_path_utf_chars(env, java_library_path);
+ library_path = library_path_utf_chars.c_str();
+ }
std::string permitted_path;
if (java_permitted_path != nullptr) {