Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5b4123bc6709641315120a191e36cc57541349b2
diff --git a/tests/fortify_filecheck_diagnostics_test.cpp b/tests/fortify_filecheck_diagnostics_test.cpp
index 375a156..5629408 100644
--- a/tests/fortify_filecheck_diagnostics_test.cpp
+++ b/tests/fortify_filecheck_diagnostics_test.cpp
@@ -211,7 +211,7 @@
// NOLINTNEXTLINE(whitespace/line_length)
// GCC: error: call to '__recvfrom_error' declared with attribute error: 'recvfrom' called with size bigger than buffer
// CLANG: error: 'recvfrom' called with size bigger than buffer
- recvfrom(0, buf, 6, 0, reinterpret_cast<sockaddr*>(&addr), NULL);
+ recvfrom(0, buf, 6, 0, reinterpret_cast<sockaddr*>(&addr), nullptr);
}
void test_recv() {
@@ -398,9 +398,9 @@
realpath(".", buf);
// This is fine.
- realpath(".", NULL);
+ realpath(".", nullptr);
char bigbuf[PATH_MAX];
// CLANG: error: 'realpath': NULL path is never correct; flipped arguments?
- realpath(NULL, bigbuf);
+ realpath(nullptr, bigbuf);
}