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/fortify.cpp b/libc/bionic/fortify.cpp
index 3bd9e68..4b94573 100644
--- a/libc/bionic/fortify.cpp
+++ b/libc/bionic/fortify.cpp
@@ -290,7 +290,7 @@
return const_cast<char*>(p);
}
if (*p == '\0') {
- return NULL;
+ return nullptr;
}
}
}
@@ -387,7 +387,7 @@
}
char* __strrchr_chk(const char* p, int ch, size_t s_len) {
- for (const char* save = NULL;; ++p, s_len--) {
+ for (const char* save = nullptr;; ++p, s_len--) {
if (s_len == 0) {
__fortify_fatal("strrchr: prevented read past end of buffer");
}