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/new.cpp b/libc/bionic/new.cpp
index 9499ff5..a0da2fb 100644
--- a/libc/bionic/new.cpp
+++ b/libc/bionic/new.cpp
@@ -25,7 +25,7 @@
void* operator new(std::size_t size) {
void* p = malloc(size);
- if (p == NULL) {
+ if (p == nullptr) {
async_safe_fatal("new failed to allocate %zu bytes", size);
}
return p;
@@ -33,7 +33,7 @@
void* operator new[](std::size_t size) {
void* p = malloc(size);
- if (p == NULL) {
+ if (p == nullptr) {
async_safe_fatal("new[] failed to allocate %zu bytes", size);
}
return p;