Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I226a0599db4f7c3557e55cade7869d00bd314949
diff --git a/server/IptablesBaseTest.cpp b/server/IptablesBaseTest.cpp
index c81773b..b3748cd 100644
--- a/server/IptablesBaseTest.cpp
+++ b/server/IptablesBaseTest.cpp
@@ -41,7 +41,7 @@
int IptablesBaseTest::fake_android_fork_exec(int argc, char* argv[], int *status, bool, bool) {
std::string cmd = argv[0];
for (int i = 1; i < argc; i++) {
- if (argv[i] == NULL) break;
+ if (argv[i] == nullptr) break;
cmd += " ";
cmd += argv[i];
}
@@ -63,7 +63,7 @@
FILE *IptablesBaseTest::fake_popen(const char * /* cmd */, const char *type) {
if (sPopenContents.empty() || strcmp(type, "r") != 0) {
- return NULL;
+ return nullptr;
}
std::string realCmd = StringPrintf("echo '%s'", sPopenContents.front().c_str());