diff --git a/benchmarks/property_benchmark.cpp b/benchmarks/property_benchmark.cpp index ef5f225fe..97eb832c6 100644 --- a/benchmarks/property_benchmark.cpp +++ b/benchmarks/property_benchmark.cpp @@ -28,8 +28,6 @@ #include -extern void* __system_property_area__; - // Do not exceed 512, that is about the largest number of properties // that can be created with the current property area size. #define TEST_NUM_PROPS \ @@ -53,9 +51,6 @@ struct LocalPropertyTestState { return; } - old_pa = __system_property_area__; - __system_property_area__ = NULL; - pa_dirname = dirname; pa_filename = pa_dirname + "/__properties__"; @@ -111,9 +106,8 @@ struct LocalPropertyTestState { if (!valid) return; - __system_property_area__ = old_pa; - __system_property_set_filename(PROP_FILENAME); + __system_property_area_init(); unlink(pa_filename.c_str()); rmdir(pa_dirname.c_str()); @@ -138,7 +132,6 @@ struct LocalPropertyTestState { private: std::string pa_dirname; std::string pa_filename; - void* old_pa; }; static void BM_property_get(benchmark::State& state) { diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp index ec1d18fa4..2bbf2d306 100644 --- a/libc/bionic/system_properties.cpp +++ b/libc/bionic/system_properties.cpp @@ -209,7 +209,6 @@ struct find_nth_cookie { }; // This is public because it was exposed in the NDK. As of 2017-01, ~60 apps reference this symbol. -// It's also used in a libnativehelper test. prop_area* __system_property_area__ = nullptr; static char property_filename[PROP_FILENAME_MAX] = PROP_FILENAME; diff --git a/tests/system_properties_test.cpp b/tests/system_properties_test.cpp index ff9754927..23d0cad3b 100644 --- a/tests/system_properties_test.cpp +++ b/tests/system_properties_test.cpp @@ -29,8 +29,6 @@ #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ #include -extern void *__system_property_area__; - struct LocalPropertyTestState { LocalPropertyTestState() : valid(false) { const char* ANDROID_DATA = getenv("ANDROID_DATA");