[libutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
diff --git a/libutils/misc.cpp b/libutils/misc.cpp
index f074341..f77e189 100644
--- a/libutils/misc.cpp
+++ b/libutils/misc.cpp
@@ -41,13 +41,13 @@
#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 @@
#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);