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/error.cpp b/libc/bionic/error.cpp
index e8df0e0..a8adc1b 100644
--- a/libc/bionic/error.cpp
+++ b/libc/bionic/error.cpp
@@ -34,13 +34,13 @@
#include <string.h>
unsigned int error_message_count = 0;
-void (*error_print_progname)(void) = NULL;
+void (*error_print_progname)(void) = nullptr;
int error_one_per_line = 0;
static void __error_head() {
++error_message_count;
- if (error_print_progname != NULL) {
+ if (error_print_progname != nullptr) {
error_print_progname();
} else {
fflush(stdout);
@@ -77,7 +77,7 @@
if (error_one_per_line) {
static const char* last_file;
static unsigned int last_line;
- if (last_line == line && last_file != NULL && strcmp(last_file, file) == 0) {
+ if (last_line == line && last_file != nullptr && strcmp(last_file, file) == 0) {
return;
}
last_file = file;