Use libbase properties for a slight simplification.
Test: treehugger
Change-Id: If699230d0bf71ce521d7175da707e42b78ae4886
diff --git a/netbpfload/loader.cpp b/netbpfload/loader.cpp
index 82ce6d5..9aeb184 100644
--- a/netbpfload/loader.cpp
+++ b/netbpfload/loader.cpp
@@ -59,9 +59,9 @@
#include <android-base/cmsg.h>
#include <android-base/file.h>
+#include <android-base/properties.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
-#include <cutils/properties.h>
#define BPF_FS_PATH "/sys/fs/bpf/"
@@ -79,17 +79,11 @@
using std::string;
using std::vector;
-static std::string getBuildTypeInternal() {
- char value[PROPERTY_VALUE_MAX] = {};
- (void)property_get("ro.build.type", value, "unknown"); // ignore length
- return value;
-}
-
namespace android {
namespace bpf {
const std::string& getBuildType() {
- static std::string t = getBuildTypeInternal();
+ static std::string t = android::base::GetProperty("ro.build.type", "unknown");
return t;
}