From 3906fe75dce04f648e8e6cfe534ca2901be53501 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 21 Jul 2022 15:04:46 +0800 Subject: [PATCH] Clean up code --- native/jni/resetprop/persist.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/native/jni/resetprop/persist.cpp b/native/jni/resetprop/persist.cpp index 19d922d5f..664709b4c 100644 --- a/native/jni/resetprop/persist.cpp +++ b/native/jni/resetprop/persist.cpp @@ -153,12 +153,7 @@ static bool file_getprop(const char *name, char *value) { } static bool check_pb() { - static bool checked = false; - static bool use_pb = false; - if (!checked) { - checked = true; - use_pb = access(PERSISTENT_PROPERTY_DIR "/persistent_properties", R_OK) == 0; - } + static bool use_pb = access(PERSISTENT_PROPERTY_DIR "/persistent_properties", R_OK) == 0; return use_pb; }