diff --git a/benchmarks/bionic_benchmarks.cpp b/benchmarks/bionic_benchmarks.cpp
index e4c32fa..4a19fe1 100644
--- a/benchmarks/bionic_benchmarks.cpp
+++ b/benchmarks/bionic_benchmarks.cpp
@@ -78,12 +78,12 @@
 
 static struct option g_long_options[] =
 {
-  {"bionic_cpu", required_argument, 0, 'c'},
-  {"bionic_xml", required_argument, 0, 'x'},
-  {"bionic_iterations", required_argument, 0, 'i'},
-  {"bionic_extra", required_argument, 0, 'a'},
-  {"help", no_argument, 0, 'h'},
-  {0, 0, 0, 0},
+  {"bionic_cpu", required_argument, nullptr, 'c'},
+  {"bionic_xml", required_argument, nullptr, 'x'},
+  {"bionic_iterations", required_argument, nullptr, 'i'},
+  {"bionic_extra", required_argument, nullptr, 'a'},
+  {"help", no_argument, nullptr, 'h'},
+  {nullptr, 0, nullptr, 0},
 };
 
 typedef std::vector<std::vector<int64_t>> args_vector_t;
@@ -100,7 +100,7 @@
   int fake_argc = 2;
   char argv0[] = "bionic_benchmarks";
   char argv1[] = "--help";
-  char* fake_argv[3] {argv0, argv1, NULL};
+  char* fake_argv[3] {argv0, argv1, nullptr};
   benchmark::Initialize(&fake_argc, fake_argv);
   exit(1);
 }
@@ -132,7 +132,7 @@
       }
     }
   }
-  new_argv->push_back(0);
+  new_argv->push_back(nullptr);
 }
 
 bench_opts_t ParseOpts(int argc, char** argv) {
diff --git a/benchmarks/property_benchmark.cpp b/benchmarks/property_benchmark.cpp
index 17e37b0..9251a05 100644
--- a/benchmarks/property_benchmark.cpp
+++ b/benchmarks/property_benchmark.cpp
@@ -163,7 +163,7 @@
 
   size_t i = 0;
   while (state.KeepRunning()) {
-    pa.system_properties().Read(pinfo[i], 0, propvalue);
+    pa.system_properties().Read(pinfo[i], nullptr, propvalue);
     i = (i + 1) % nprops;
   }
 
diff --git a/benchmarks/pthread_benchmark.cpp b/benchmarks/pthread_benchmark.cpp
index c72736e..09654c8 100644
--- a/benchmarks/pthread_benchmark.cpp
+++ b/benchmarks/pthread_benchmark.cpp
@@ -31,7 +31,7 @@
 
 static void BM_pthread_getspecific(benchmark::State& state) {
   pthread_key_t key;
-  pthread_key_create(&key, NULL);
+  pthread_key_create(&key, nullptr);
 
   while (state.KeepRunning()) {
     pthread_getspecific(key);
@@ -43,10 +43,10 @@
 
 static void BM_pthread_setspecific(benchmark::State& state) {
   pthread_key_t key;
-  pthread_key_create(&key, NULL);
+  pthread_key_create(&key, nullptr);
 
   while (state.KeepRunning()) {
-    pthread_setspecific(key, NULL);
+    pthread_setspecific(key, nullptr);
   }
 
   pthread_key_delete(key);
@@ -147,7 +147,7 @@
 
 static void BM_pthread_rwlock_read(benchmark::State& state) {
   pthread_rwlock_t lock;
-  pthread_rwlock_init(&lock, NULL);
+  pthread_rwlock_init(&lock, nullptr);
 
   while (state.KeepRunning()) {
     pthread_rwlock_rdlock(&lock);
@@ -160,7 +160,7 @@
 
 static void BM_pthread_rwlock_write(benchmark::State& state) {
   pthread_rwlock_t lock;
-  pthread_rwlock_init(&lock, NULL);
+  pthread_rwlock_init(&lock, nullptr);
 
   while (state.KeepRunning()) {
     pthread_rwlock_wrlock(&lock);
@@ -172,42 +172,42 @@
 BIONIC_BENCHMARK(BM_pthread_rwlock_write);
 
 static void* IdleThread(void*) {
-  return NULL;
+  return nullptr;
 }
 
 static void BM_pthread_create(benchmark::State& state) {
   while (state.KeepRunning()) {
     pthread_t thread;
-    pthread_create(&thread, NULL, IdleThread, NULL);
+    pthread_create(&thread, nullptr, IdleThread, nullptr);
     state.PauseTiming();
-    pthread_join(thread, NULL);
+    pthread_join(thread, nullptr);
     state.ResumeTiming();
   }
 }
 BIONIC_BENCHMARK(BM_pthread_create);
 
 static void* RunThread(void*) {
-  return NULL;
+  return nullptr;
 }
 
 static void BM_pthread_create_and_run(benchmark::State& state) {
   while (state.KeepRunning()) {
     pthread_t thread;
-    pthread_create(&thread, NULL, RunThread, &state);
-    pthread_join(thread, NULL);
+    pthread_create(&thread, nullptr, RunThread, &state);
+    pthread_join(thread, nullptr);
   }
 }
 BIONIC_BENCHMARK(BM_pthread_create_and_run);
 
 static void* ExitThread(void*) {
-  pthread_exit(NULL);
+  pthread_exit(nullptr);
 }
 
 static void BM_pthread_exit_and_join(benchmark::State& state) {
   while (state.KeepRunning()) {
     pthread_t thread;
-    pthread_create(&thread, NULL, ExitThread, nullptr);
-    pthread_join(thread, NULL);
+    pthread_create(&thread, nullptr, ExitThread, nullptr);
+    pthread_join(thread, nullptr);
   }
 }
 BIONIC_BENCHMARK(BM_pthread_exit_and_join);
@@ -215,7 +215,7 @@
 static void BM_pthread_key_create(benchmark::State& state) {
   while (state.KeepRunning()) {
     pthread_key_t key;
-    pthread_key_create(&key, NULL);
+    pthread_key_create(&key, nullptr);
 
     state.PauseTiming();
     pthread_key_delete(key);
@@ -228,7 +228,7 @@
   while (state.KeepRunning()) {
     state.PauseTiming();
     pthread_key_t key;
-    pthread_key_create(&key, NULL);
+    pthread_key_create(&key, nullptr);
     state.ResumeTiming();
 
     pthread_key_delete(key);
diff --git a/benchmarks/semaphore_benchmark.cpp b/benchmarks/semaphore_benchmark.cpp
index a4aa7bb..ba89137 100644
--- a/benchmarks/semaphore_benchmark.cpp
+++ b/benchmarks/semaphore_benchmark.cpp
@@ -75,7 +75,7 @@
   while ((BM_semaphore_sem_post_running > 0) && !sem_wait(semaphore)) {
   }
   BM_semaphore_sem_post_running = -1;
-  return NULL;
+  return nullptr;
 }
 
 class SemaphoreFixture : public benchmark::Fixture {
diff --git a/benchmarks/stdio_benchmark.cpp b/benchmarks/stdio_benchmark.cpp
index 9c81e0f..21d9dc0 100644
--- a/benchmarks/stdio_benchmark.cpp
+++ b/benchmarks/stdio_benchmark.cpp
@@ -43,7 +43,7 @@
   char* buf = new char[chunk_size];
 
   if (!buffered) {
-    setvbuf(fp, 0, _IONBF, 0);
+    setvbuf(fp, nullptr, _IONBF, 0);
   }
 
   while (state.KeepRunning()) {
diff --git a/benchmarks/stdlib_benchmark.cpp b/benchmarks/stdlib_benchmark.cpp
index 24773de..880bc1d 100644
--- a/benchmarks/stdlib_benchmark.cpp
+++ b/benchmarks/stdlib_benchmark.cpp
@@ -111,7 +111,7 @@
 
   wchar_t wc = 0;
   while (state.KeepRunning()) {
-    for (j = 0; buf_aligned[j]; j+=mbrtowc(&wc, buf_aligned + j, 4, NULL)) {
+    for (j = 0; buf_aligned[j]; j+=mbrtowc(&wc, buf_aligned + j, 4, nullptr)) {
     }
   }
 
