Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5b4123bc6709641315120a191e36cc57541349b2
diff --git a/libc/bionic/pthread_mutex.cpp b/libc/bionic/pthread_mutex.cpp
index 7f48972..fda0b93 100644
--- a/libc/bionic/pthread_mutex.cpp
+++ b/libc/bionic/pthread_mutex.cpp
@@ -502,7 +502,7 @@
memset(mutex, 0, sizeof(pthread_mutex_internal_t));
- if (__predict_true(attr == NULL)) {
+ if (__predict_true(attr == nullptr)) {
atomic_init(&mutex->state, MUTEX_TYPE_BITS_NORMAL);
return 0;
}
@@ -800,7 +800,7 @@
// Some apps depend on being able to pass NULL as a mutex and get EINVAL
// back. Don't need to worry about it for LP64 since the ABI is brand new,
// but keep compatibility for LP32. http://b/19995172.
- if (mutex_interface == NULL) {
+ if (mutex_interface == nullptr) {
return EINVAL;
}
#endif
@@ -834,7 +834,7 @@
// Some apps depend on being able to pass NULL as a mutex and get EINVAL
// back. Don't need to worry about it for LP64 since the ABI is brand new,
// but keep compatibility for LP32. http://b/19995172.
- if (mutex_interface == NULL) {
+ if (mutex_interface == nullptr) {
return EINVAL;
}
#endif