summaryrefslogtreecommitdiffstats
path: root/libutils/misc.cpp
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2018-07-16 18:11:34 -0700
committerYi Kong <yikong@google.com>2018-07-16 18:11:34 -0700
commite1731a4f2e05f1abb4a45602067708851eaf1e14 (patch)
tree339c0ce3d3de7d6f5e0fb9bdada9b6210d1d470f /libutils/misc.cpp
parent895acebe946e34d2626716c5c4d7d7f2cc28c39d (diff)
downloadsystem_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.tar.gz
system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.tar.bz2
system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.zip
[libutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
Diffstat (limited to 'libutils/misc.cpp')
-rw-r--r--libutils/misc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libutils/misc.cpp b/libutils/misc.cpp
index f07434187..f77e1899f 100644
--- a/libutils/misc.cpp
+++ b/libutils/misc.cpp
@@ -41,13 +41,13 @@ struct sysprop_change_callback_info {
#if !defined(_WIN32)
static pthread_mutex_t gSyspropMutex = PTHREAD_MUTEX_INITIALIZER;
-static Vector<sysprop_change_callback_info>* gSyspropList = NULL;
+static Vector<sysprop_change_callback_info>* gSyspropList = nullptr;
#endif
#if !defined(_WIN32)
void add_sysprop_change_callback(sysprop_change_callback cb, int priority) {
pthread_mutex_lock(&gSyspropMutex);
- if (gSyspropList == NULL) {
+ if (gSyspropList == nullptr) {
gSyspropList = new Vector<sysprop_change_callback_info>();
}
sysprop_change_callback_info info;
@@ -103,7 +103,7 @@ void do_report_sysprop_change() {
#if !defined(_WIN32)
pthread_mutex_lock(&gSyspropMutex);
Vector<sysprop_change_callback_info> listeners;
- if (gSyspropList != NULL) {
+ if (gSyspropList != nullptr) {
listeners = *gSyspropList;
}
pthread_mutex_unlock(&gSyspropMutex);