THRIFT-5225: Use nullptr instead of NULL
Patch: Zezeng Wang

This closes #2168
diff --git a/lib/cpp/test/OpenSSLManualInitTest.cpp b/lib/cpp/test/OpenSSLManualInitTest.cpp
index a751806..935a205 100644
--- a/lib/cpp/test/OpenSSLManualInitTest.cpp
+++ b/lib/cpp/test/OpenSSLManualInitTest.cpp
@@ -88,6 +88,6 @@
 
   suite->add(BOOST_TEST_CASE(test_openssl_availability));
 
-  return NULL;
+  return nullptr;
 }
 #endif
\ No newline at end of file
diff --git a/lib/cpp/test/TFileTransportTest.cpp b/lib/cpp/test/TFileTransportTest.cpp
index 21c1f3b..c116fdc 100644
--- a/lib/cpp/test/TFileTransportTest.cpp
+++ b/lib/cpp/test/TFileTransportTest.cpp
@@ -399,6 +399,6 @@
 
   // Parse arguments
   parse_args(argc, argv);
-  return NULL;
+  return nullptr;
 }
 #endif
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index a890aa8..085197a 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -230,7 +230,7 @@
   HANDLE hWrite;
 
   CoupledPipeTransports() {
-    BOOST_REQUIRE(CreatePipe(&hRead, &hWrite, NULL, 1048576 * 2));
+    BOOST_REQUIRE(CreatePipe(&hRead, &hWrite, nullptr, 1048576 * 2));
     in.reset(new TPipe(hRead, hWrite));
     in->open();
     out = in;
@@ -707,7 +707,7 @@
   uint8_t read_buf[16];
   memset(write_buf, 'a', sizeof(write_buf));
 
-  // Attemping to borrow 10 bytes when only 9 are available should return NULL
+  // Attemping to borrow 10 bytes when only 9 are available should return nullptr
   // immediately.
   transports.out->write(write_buf, 9);
   transports.out->flush();
@@ -1075,7 +1075,7 @@
   THRIFT_UNUSED_VARIABLE(argc);
   THRIFT_UNUSED_VARIABLE(argv);
   struct timeval tv;
-  THRIFT_GETTIMEOFDAY(&tv, NULL);
+  THRIFT_GETTIMEOFDAY(&tv, nullptr);
   int seed = tv.tv_sec ^ tv.tv_usec;
 
   initrand(seed);
@@ -1084,6 +1084,6 @@
   suite->p_name.value = "TransportTest";
   TransportTestGen transport_test_generator(suite, 1);
   transport_test_generator.generate();
-  return NULL;
+  return nullptr;
 }
 #endif
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp
index 3e2eb81..274a243 100644
--- a/lib/cpp/test/ZlibTest.cpp
+++ b/lib/cpp/test/ZlibTest.cpp
@@ -454,7 +454,7 @@
 boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
   THRIFT_UNUSED_VARIABLE(argc);
   THRIFT_UNUSED_VARIABLE(argv);
-  uint32_t seed = static_cast<uint32_t>(time(NULL));
+  uint32_t seed = static_cast<uint32_t>(time(nullptr));
 #ifdef HAVE_INTTYPES_H
   printf("seed: %" PRIu32 "\n", seed);
 #endif
@@ -470,6 +470,6 @@
 
   suite->add(BOOST_TEST_CASE(test_no_write));
 
-  return NULL;
+  return nullptr;
 }
 #endif
diff --git a/lib/cpp/test/processor/ProcessorTest.cpp b/lib/cpp/test/processor/ProcessorTest.cpp
index a36ef3e..017fa89 100644
--- a/lib/cpp/test/processor/ProcessorTest.cpp
+++ b/lib/cpp/test/processor/ProcessorTest.cpp
@@ -924,6 +924,6 @@
   THRIFT_UNUSED_VARIABLE(argc);
   THRIFT_UNUSED_VARIABLE(argv);
   ::boost::unit_test::framework::master_test_suite().p_name.value = "ProcessorTest";
-  return NULL;
+  return nullptr;
 }
 #endif