kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [2/5] incubator-kudu git commit: Replace NULL with nullptr
Date Tue, 19 Jan 2016 22:48:12 GMT
http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/transactions/transaction_tracker-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_tracker-test.cc b/src/kudu/tablet/transactions/transaction_tracker-test.cc
index af7067c..6b45157 100644
--- a/src/kudu/tablet/transactions/transaction_tracker-test.cc
+++ b/src/kudu/tablet/transactions/transaction_tracker-test.cc
@@ -48,7 +48,7 @@ class TransactionTrackerTest : public KuduTest {
  public:
   class NoOpTransactionState : public TransactionState {
    public:
-    NoOpTransactionState() : TransactionState(NULL) {}
+    NoOpTransactionState() : TransactionState(nullptr) {}
     virtual const google::protobuf::Message* request() const OVERRIDE { return &req_; }
     virtual std::string ToString() const OVERRIDE { return "NoOpTransactionState"; }
    private:
@@ -89,11 +89,11 @@ class TransactionTrackerTest : public KuduTest {
     vector<scoped_refptr<TransactionDriver> > local_drivers;
     for (int i = 0; i < num_drivers; i++) {
       scoped_refptr<TransactionDriver> driver(new TransactionDriver(&tracker_,
-                                                                    NULL,
-                                                                    NULL,
-                                                                    NULL,
-                                                                    NULL,
-                                                                    NULL));
+                                                                    nullptr,
+                                                                    nullptr,
+                                                                    nullptr,
+                                                                    nullptr,
+                                                                    nullptr));
       gscoped_ptr<NoOpTransaction> tx(new NoOpTransaction(new NoOpTransactionState));
       RETURN_NOT_OK(driver->Init(tx.PassAs<Transaction>(), consensus::LEADER));
       local_drivers.push_back(driver);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/transactions/write_transaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/write_transaction.cc b/src/kudu/tablet/transactions/write_transaction.cc
index 013b312..ebb74d8 100644
--- a/src/kudu/tablet/transactions/write_transaction.cc
+++ b/src/kudu/tablet/transactions/write_transaction.cc
@@ -126,7 +126,7 @@ Status WriteTransaction::Apply(gscoped_ptr<CommitMsg>* commit_msg) {
   // Add per-row errors to the result, update metrics.
   int i = 0;
   for (const RowOp* op : state()->row_ops()) {
-    if (state()->response() != NULL && op->result->has_failed_status()) {
+    if (state()->response() != nullptr && op->result->has_failed_status()) {
       // Replicas disregard the per row errors, for now
       // TODO check the per-row errors against the leader's, at least in debug mode
       WriteResponsePB::PerRowErrorPB* error = state()->response()->add_per_row_errors();
@@ -212,8 +212,8 @@ WriteTransactionState::WriteTransactionState(TabletPeer* tablet_peer,
   : TransactionState(tablet_peer),
     request_(request),
     response_(response),
-    mvcc_tx_(NULL),
-    schema_at_decode_time_(NULL) {
+    mvcc_tx_(nullptr),
+    schema_at_decode_time_(nullptr) {
   if (request) {
     external_consistency_mode_ = request->external_consistency_mode();
   } else {
@@ -257,7 +257,7 @@ void WriteTransactionState::StartApplying() {
 }
 
 void WriteTransactionState::Abort() {
-  if (mvcc_tx_.get() != NULL) {
+  if (mvcc_tx_.get() != nullptr) {
     // Abort the transaction.
     mvcc_tx_->Abort();
   }
@@ -271,7 +271,7 @@ void WriteTransactionState::Abort() {
   ResetRpcFields();
 }
 void WriteTransactionState::Commit() {
-  if (mvcc_tx_.get() != NULL) {
+  if (mvcc_tx_.get() != nullptr) {
     // Commit the transaction.
     mvcc_tx_->Commit();
   }
@@ -326,14 +326,14 @@ void WriteTransactionState::Reset() {
   Commit();
   tx_metrics_.Reset();
   timestamp_ = Timestamp::kInvalidTimestamp;
-  tablet_components_ = NULL;
-  schema_at_decode_time_ = NULL;
+  tablet_components_ = nullptr;
+  schema_at_decode_time_ = nullptr;
 }
 
 void WriteTransactionState::ResetRpcFields() {
   lock_guard<simple_spinlock> l(&txn_state_lock_);
-  request_ = NULL;
-  response_ = NULL;
+  request_ = nullptr;
+  response_ = nullptr;
   STLDeleteElements(&row_ops_);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tools/fs_tool.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/fs_tool.cc b/src/kudu/tools/fs_tool.cc
index 83f26bb..f2c2ae8 100644
--- a/src/kudu/tools/fs_tool.cc
+++ b/src/kudu/tools/fs_tool.cc
@@ -336,7 +336,8 @@ Status FsTool::DumpTabletData(const std::string& tablet_id) {
   RETURN_NOT_OK(TabletMetadata::Load(fs_manager_.get(), tablet_id, &meta));
 
   scoped_refptr<log::LogAnchorRegistry> reg(new log::LogAnchorRegistry());
-  Tablet t(meta, scoped_refptr<server::Clock>(NULL), shared_ptr<MemTracker>(), NULL, reg.get());
+  Tablet t(meta, scoped_refptr<server::Clock>(nullptr), shared_ptr<MemTracker>(),
+           nullptr, reg.get());
   RETURN_NOT_OK_PREPEND(t.Open(), "Couldn't open tablet");
   vector<string> lines;
   RETURN_NOT_OK_PREPEND(t.DebugDump(&lines), "Couldn't dump tablet");

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tools/kudu-admin-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/kudu-admin-test.cc b/src/kudu/tools/kudu-admin-test.cc
index 9ba8bd8..87cf951 100644
--- a/src/kudu/tools/kudu-admin-test.cc
+++ b/src/kudu/tools/kudu-admin-test.cc
@@ -80,14 +80,14 @@ TEST_F(AdminCliTest, TestChangeConfig) {
   InsertOrDie(&active_tablet_servers, leader->uuid(), leader);
   InsertOrDie(&active_tablet_servers, follower->uuid(), follower);
 
-  TServerDetails* new_node = NULL;
+  TServerDetails* new_node = nullptr;
   for (TServerDetails* ts : tservers) {
     if (!ContainsKey(active_tablet_servers, ts->uuid())) {
       new_node = ts;
       break;
     }
   }
-  ASSERT_TRUE(new_node != NULL);
+  ASSERT_TRUE(new_node != nullptr);
 
   // Elect the leader (still only a consensus config size of 2).
   ASSERT_OK(StartElection(leader, tablet_id_, MonoDelta::FromSeconds(10)));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tools/kudu-admin.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/kudu-admin.cc b/src/kudu/tools/kudu-admin.cc
index d2952ef..16bfcad 100644
--- a/src/kudu/tools/kudu-admin.cc
+++ b/src/kudu/tools/kudu-admin.cc
@@ -85,7 +85,7 @@ using strings::Substitute;
 const char* const kChangeConfigOp = "change_config";
 const char* const kListTablesOp = "list_tables";
 const char* const kDeleteTableOp = "delete_table";
-static const char* g_progname = NULL;
+static const char* g_progname = nullptr;
 
 class ClusterAdminClient {
  public:

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/heartbeater.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/heartbeater.cc b/src/kudu/tserver/heartbeater.cc
index 18687be..13ba018 100644
--- a/src/kudu/tserver/heartbeater.cc
+++ b/src/kudu/tserver/heartbeater.cc
@@ -431,7 +431,7 @@ bool Heartbeater::Thread::IsCurrentThread() const {
 }
 
 Status Heartbeater::Thread::Start() {
-  CHECK(thread_ == NULL);
+  CHECK(thread_ == nullptr);
 
   should_run_ = true;
   return kudu::Thread::Create("heartbeater", "heartbeat",
@@ -449,7 +449,7 @@ Status Heartbeater::Thread::Stop() {
     cond_.Signal();
   }
   RETURN_NOT_OK(ThreadJoiner(thread_.get()).Join());
-  thread_ = NULL;
+  thread_ = nullptr;
   return Status::OK();
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/mini_tablet_server.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/mini_tablet_server.cc b/src/kudu/tserver/mini_tablet_server.cc
index f9e1bb2..6f835ad 100644
--- a/src/kudu/tserver/mini_tablet_server.cc
+++ b/src/kudu/tserver/mini_tablet_server.cc
@@ -133,7 +133,7 @@ Status MiniTabletServer::AddTestTablet(const std::string& table_id,
 
   return server_->tablet_manager()->CreateNewTablet(
     table_id, tablet_id, partition.second, table_id,
-    schema_with_ids, partition.first, config, NULL);
+    schema_with_ids, partition.first, config, nullptr);
 }
 
 void MiniTabletServer::FailHeartbeats() {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/remote_bootstrap_client.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/remote_bootstrap_client.cc b/src/kudu/tserver/remote_bootstrap_client.cc
index 1eb0e4f..d549c3d 100644
--- a/src/kudu/tserver/remote_bootstrap_client.cc
+++ b/src/kudu/tserver/remote_bootstrap_client.cc
@@ -96,7 +96,7 @@ RemoteBootstrapClient::RemoteBootstrapClient(const std::string& tablet_id,
     downloaded_wal_(false),
     downloaded_blocks_(false),
     replace_tombstoned_tablet_(false),
-    status_listener_(NULL),
+    status_listener_(nullptr),
     session_idle_timeout_millis_(0),
     start_time_micros_(0) {
 }
@@ -303,7 +303,7 @@ Status RemoteBootstrapClient::UnwindRemoteError(const Status& status,
 }
 
 void RemoteBootstrapClient::UpdateStatusMessage(const string& message) {
-  if (status_listener_ != NULL) {
+  if (status_listener_ != nullptr) {
     status_listener_->StatusMessage("RemoteBootstrap: " + message);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/remote_bootstrap_service-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/remote_bootstrap_service-test.cc b/src/kudu/tserver/remote_bootstrap_service-test.cc
index ebf9c69..0ab2c1b 100644
--- a/src/kudu/tserver/remote_bootstrap_service-test.cc
+++ b/src/kudu/tserver/remote_bootstrap_service-test.cc
@@ -79,9 +79,9 @@ class RemoteBootstrapServiceTest : public RemoteBootstrapTest {
   }
 
   Status DoBeginValidRemoteBootstrapSession(string* session_id,
-                                            tablet::TabletSuperBlockPB* superblock = NULL,
-                                            uint64_t* idle_timeout_millis = NULL,
-                                            vector<uint64_t>* sequence_numbers = NULL) {
+                                            tablet::TabletSuperBlockPB* superblock = nullptr,
+                                            uint64_t* idle_timeout_millis = nullptr,
+                                            vector<uint64_t>* sequence_numbers = nullptr) {
     BeginRemoteBootstrapSessionResponsePB resp;
     RpcController controller;
     RETURN_NOT_OK(DoBeginRemoteBootstrapSession(GetTabletId(), GetLocalUUID(), &resp, &controller));
@@ -202,7 +202,7 @@ TEST_F(RemoteBootstrapServiceTest, TestSimpleBeginEndSession) {
 
   EndRemoteBootstrapSessionResponsePB resp;
   RpcController controller;
-  ASSERT_OK(DoEndRemoteBootstrapSession(session_id, true, NULL, &resp, &controller));
+  ASSERT_OK(DoEndRemoteBootstrapSession(session_id, true, nullptr, &resp, &controller));
 }
 
 // Test starting two sessions. The current implementation will silently only create one.
@@ -228,7 +228,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidSessionId) {
     DataIdPB data_id;
     data_id.set_type(DataIdPB::BLOCK);
     data_id.mutable_block_id()->set_id(1);
-    Status status = DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller);
+    Status status = DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller);
     ASSERT_REMOTE_ERROR(status, controller.error_response(), RemoteBootstrapErrorPB::NO_SESSION,
                         Status::NotFound("").CodeAsString());
   }
@@ -237,7 +237,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidSessionId) {
   for (const string& session_id : bad_session_ids) {
     EndRemoteBootstrapSessionResponsePB resp;
     RpcController controller;
-    Status status = DoEndRemoteBootstrapSession(session_id, true, NULL, &resp, &controller);
+    Status status = DoEndRemoteBootstrapSession(session_id, true, nullptr, &resp, &controller);
     ASSERT_REMOTE_ERROR(status, controller.error_response(), RemoteBootstrapErrorPB::NO_SESSION,
                         Status::NotFound("").CodeAsString());
   }
@@ -265,7 +265,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidBlockOrOpId) {
     DataIdPB data_id;
     data_id.set_type(DataIdPB::BLOCK);
     data_id.mutable_block_id()->set_id(1);
-    Status status = DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller);
+    Status status = DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller);
     ASSERT_REMOTE_ERROR(status, controller.error_response(),
                         RemoteBootstrapErrorPB::BLOCK_NOT_FOUND,
                         Status::NotFound("").CodeAsString());
@@ -278,7 +278,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidBlockOrOpId) {
     DataIdPB data_id;
     data_id.set_type(DataIdPB::LOG_SEGMENT);
     data_id.set_wal_segment_seqno(31337);
-    Status status = DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller);
+    Status status = DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller);
     ASSERT_REMOTE_ERROR(status, controller.error_response(),
                         RemoteBootstrapErrorPB::WAL_SEGMENT_NOT_FOUND,
                         Status::NotFound("").CodeAsString());
@@ -291,7 +291,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidBlockOrOpId) {
     RpcController controller;
     DataIdPB data_id;
     data_id.mutable_block_id()->set_id(1);
-    Status status = DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller);
+    Status status = DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller);
     ASSERT_TRUE(status.IsInvalidArgument());
   }
 
@@ -301,7 +301,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidBlockOrOpId) {
     RpcController controller;
     DataIdPB data_id;
     data_id.set_type(DataIdPB::LOG_SEGMENT);
-    Status status = DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller);
+    Status status = DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller);
     ASSERT_REMOTE_ERROR(status, controller.error_response(),
                         RemoteBootstrapErrorPB::INVALID_REMOTE_BOOTSTRAP_REQUEST,
                         Status::InvalidArgument("").CodeAsString());
@@ -315,7 +315,7 @@ TEST_F(RemoteBootstrapServiceTest, TestInvalidBlockOrOpId) {
     data_id.set_type(DataIdPB::BLOCK);
     data_id.mutable_block_id()->set_id(1);
     data_id.set_wal_segment_seqno(0);
-    Status status = DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller);
+    Status status = DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller);
     ASSERT_REMOTE_ERROR(status, controller.error_response(),
                         RemoteBootstrapErrorPB::INVALID_REMOTE_BOOTSTRAP_REQUEST,
                         Status::InvalidArgument("").CodeAsString());
@@ -333,7 +333,7 @@ TEST_F(RemoteBootstrapServiceTest, TestFetchInvalidBlockOffset) {
   // Impossible offset.
   uint64_t offset = std::numeric_limits<uint64_t>::max();
   Status status = DoFetchData(session_id, AsDataTypeId(FirstColumnBlockId(superblock)),
-                              &offset, NULL, &resp, &controller);
+                              &offset, nullptr, &resp, &controller);
   ASSERT_REMOTE_ERROR(status, controller.error_response(),
                       RemoteBootstrapErrorPB::INVALID_REMOTE_BOOTSTRAP_REQUEST,
                       Status::InvalidArgument("").CodeAsString());
@@ -355,7 +355,7 @@ TEST_F(RemoteBootstrapServiceTest, TestFetchBlockAtOnce) {
   // Remote.
   FetchDataResponsePB resp;
   RpcController controller;
-  ASSERT_OK(DoFetchData(session_id, AsDataTypeId(block_id), NULL, NULL, &resp, &controller));
+  ASSERT_OK(DoFetchData(session_id, AsDataTypeId(block_id), nullptr, nullptr, &resp, &controller));
 
   AssertDataEqual(local_data.data(), local_data.size(), resp.chunk());
 }
@@ -408,7 +408,7 @@ TEST_F(RemoteBootstrapServiceTest, TestFetchLog) {
   DataIdPB data_id;
   data_id.set_type(DataIdPB::LOG_SEGMENT);
   data_id.set_wal_segment_seqno(seg_seqno);
-  ASSERT_OK(DoFetchData(session_id, data_id, NULL, NULL, &resp, &controller));
+  ASSERT_OK(DoFetchData(session_id, data_id, nullptr, nullptr, &resp, &controller));
 
   // Fetch the local data.
   log::SegmentSequence local_segments;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/scanners-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/scanners-test.cc b/src/kudu/tserver/scanners-test.cc
index bd718b2..68cfe4c 100644
--- a/src/kudu/tserver/scanners-test.cc
+++ b/src/kudu/tserver/scanners-test.cc
@@ -35,8 +35,8 @@ namespace tserver {
 using std::vector;
 
 TEST(ScannersTest, TestManager) {
-  scoped_refptr<TabletPeer> null_peer(NULL);
-  ScannerManager mgr(NULL);
+  scoped_refptr<TabletPeer> null_peer(nullptr);
+  ScannerManager mgr(nullptr);
 
   // Create two scanners, make sure their ids are different.
   SharedScanner s1, s2;
@@ -64,7 +64,7 @@ TEST(ScannersTest, TestManager) {
 }
 
 TEST(ScannerTest, TestExpire) {
-  scoped_refptr<TabletPeer> null_peer(NULL);
+  scoped_refptr<TabletPeer> null_peer(nullptr);
   FLAGS_scanner_ttl_ms = 100;
   MetricRegistry registry;
   ScannerManager mgr(METRIC_ENTITY_server.Instantiate(&registry, "test"));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/scanners.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/scanners.cc b/src/kudu/tserver/scanners.cc
index 0f1aca3..4c240bb 100644
--- a/src/kudu/tserver/scanners.cc
+++ b/src/kudu/tserver/scanners.cc
@@ -70,7 +70,7 @@ ScannerManager::~ScannerManager() {
     shutdown_ = true;
     shutdown_cv_.notify_all();
   }
-  if (removal_thread_.get() != NULL) {
+  if (removal_thread_.get() != nullptr) {
     CHECK_OK(ThreadJoiner(removal_thread_.get()).Join());
   }
   STLDeleteElements(&scanner_maps_);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/tablet_server-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_server-test.cc b/src/kudu/tserver/tablet_server-test.cc
index 16dfcc9..0b397d7 100644
--- a/src/kudu/tserver/tablet_server-test.cc
+++ b/src/kudu/tserver/tablet_server-test.cc
@@ -323,7 +323,7 @@ TEST_F(TabletServerTest, TestInsert) {
   // get the clock's current timestamp
   Timestamp now_before = mini_server_->server()->clock()->Now();
 
-  rows_inserted = NULL;
+  rows_inserted = nullptr;
   ASSERT_NO_FATAL_FAILURE(ShutdownAndRebuildTablet());
   VerifyRows(schema_, { KeyValue(1, 1), KeyValue(2, 1), KeyValue(1234, 5678) });
 
@@ -604,8 +604,8 @@ TEST_F(TabletServerTest, TestInsertAndMutate) {
   // get the clock's current timestamp
   Timestamp now_before = mini_server_->server()->clock()->Now();
 
-  rows_inserted = NULL;
-  rows_updated = NULL;
+  rows_inserted = nullptr;
+  rows_updated = nullptr;
   ASSERT_NO_FATAL_FAILURE(ShutdownAndRebuildTablet());
   VerifyRows(schema_, { KeyValue(2, 3), KeyValue(3, 4), KeyValue(4, 4), KeyValue(6, 6) });
 
@@ -993,7 +993,8 @@ TEST_F(TabletServerTest, TestSnapshotScan) {
   vector<uint64_t> write_timestamps_collector;
 
   // perform a series of writes and collect the timestamps
-  InsertTestRowsRemote(0, 0, num_rows, num_batches, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 0, num_rows, num_batches, nullptr,
+                       kTabletId, &write_timestamps_collector);
 
   // now perform snapshot scans.
   ScanRequestPB req;
@@ -1057,7 +1058,7 @@ TEST_F(TabletServerTest, TestSnapshotScan) {
 TEST_F(TabletServerTest, TestSnapshotScan_WithoutSnapshotTimestamp) {
   vector<uint64_t> write_timestamps_collector;
   // perform a write
-  InsertTestRowsRemote(0, 0, 1, 1, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 0, 1, 1, nullptr, kTabletId, &write_timestamps_collector);
 
   ScanRequestPB req;
   ScanResponsePB resp;
@@ -1092,7 +1093,7 @@ TEST_F(TabletServerTest, TestSnapshotScan_WithoutSnapshotTimestamp) {
 TEST_F(TabletServerTest, TestSnapshotScan_SnapshotInTheFutureFails) {
   vector<uint64_t> write_timestamps_collector;
   // perform a write
-  InsertTestRowsRemote(0, 0, 1, 1, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 0, 1, 1, nullptr, kTabletId, &write_timestamps_collector);
 
   ScanRequestPB req;
   ScanResponsePB resp;
@@ -1129,9 +1130,9 @@ TEST_F(TabletServerTest, TestSnapshotScan_SnapshotInTheFutureFails) {
 TEST_F(TabletServerTest, TestSnapshotScan_OpenScanner) {
   vector<uint64_t> write_timestamps_collector;
   // Write and flush and write, so we have some rows in MRS and DRS
-  InsertTestRowsRemote(0, 0, 100, 2, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 0, 100, 2, nullptr, kTabletId, &write_timestamps_collector);
   ASSERT_OK(tablet_peer_->tablet()->Flush());
-  InsertTestRowsRemote(0, 100, 100, 2, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 100, 100, 2, nullptr, kTabletId, &write_timestamps_collector);
 
   ScanRequestPB req;
   ScanResponsePB resp;
@@ -1248,7 +1249,7 @@ TEST_F(TabletServerTest, TestSnapshotScan_LastRow) {
 TEST_F(TabletServerTest, TestSnapshotScan_SnapshotInTheFutureWithPropagatedTimestamp) {
   vector<uint64_t> write_timestamps_collector;
   // perform a write
-  InsertTestRowsRemote(0, 0, 1, 1, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 0, 1, 1, nullptr, kTabletId, &write_timestamps_collector);
 
   ScanRequestPB req;
   ScanResponsePB resp;
@@ -1306,7 +1307,7 @@ TEST_F(TabletServerTest, TestSnapshotScan_SnapshotInTheFutureWithPropagatedTimes
 TEST_F(TabletServerTest, TestSnapshotScan__SnapshotInTheFutureBeyondPropagatedTimestampFails) {
   vector<uint64_t> write_timestamps_collector;
   // perform a write
-  InsertTestRowsRemote(0, 0, 1, 1, NULL, kTabletId, &write_timestamps_collector);
+  InsertTestRowsRemote(0, 0, 1, 1, nullptr, kTabletId, &write_timestamps_collector);
 
   ScanRequestPB req;
   ScanResponsePB resp;
@@ -1776,7 +1777,7 @@ TEST_F(TabletServerTest, TestAlterSchema_AddColWithoutWriteDefault) {
   // Add a column with a read-default but no write-default.
   const uint32_t c2_read_default = 7;
   SchemaBuilder builder(schema_);
-  ASSERT_OK(builder.AddColumn("c2", INT32, false, &c2_read_default, NULL));
+  ASSERT_OK(builder.AddColumn("c2", INT32, false, &c2_read_default, nullptr));
   Schema s2 = builder.Build();
 
   req.set_dest_uuid(mini_server_->server()->fs_manager()->uuid());
@@ -2046,7 +2047,7 @@ TEST_F(TabletServerTest, TestWriteOutOfBounds) {
       "TestWriteOutOfBoundsTable", tabletId,
       partitions[1],
       tabletId, schema, partition_schema,
-      mini_server_->CreateLocalConfig(), NULL));
+      mini_server_->CreateLocalConfig(), nullptr));
 
   ASSERT_OK(WaitForTabletRunning(tabletId));
 
@@ -2082,18 +2083,18 @@ static uint32_t CalcTestRowChecksum(int32_t key, uint8_t string_field_defined =
 
   string strval = strings::Substitute("original$0", key);
   uint32_t index = 0;
-  crc->Compute(&index, sizeof(index), &row_crc, NULL);
-  crc->Compute(&key, sizeof(int32_t), &row_crc, NULL);
+  crc->Compute(&index, sizeof(index), &row_crc, nullptr);
+  crc->Compute(&key, sizeof(int32_t), &row_crc, nullptr);
 
   index = 1;
-  crc->Compute(&index, sizeof(index), &row_crc, NULL);
-  crc->Compute(&key, sizeof(int32_t), &row_crc, NULL);
+  crc->Compute(&index, sizeof(index), &row_crc, nullptr);
+  crc->Compute(&key, sizeof(int32_t), &row_crc, nullptr);
 
   index = 2;
-  crc->Compute(&index, sizeof(index), &row_crc, NULL);
-  crc->Compute(&string_field_defined, sizeof(string_field_defined), &row_crc, NULL);
+  crc->Compute(&index, sizeof(index), &row_crc, nullptr);
+  crc->Compute(&string_field_defined, sizeof(string_field_defined), &row_crc, nullptr);
   if (string_field_defined) {
-    crc->Compute(strval.c_str(), strval.size(), &row_crc, NULL);
+    crc->Compute(strval.c_str(), strval.size(), &row_crc, nullptr);
   }
   return static_cast<uint32_t>(row_crc);
 }
@@ -2132,7 +2133,7 @@ TEST_F(TabletServerTest, TestChecksumScan) {
 
   // Second row (null string field).
   key = 2;
-  InsertTestRowsRemote(0, key, 1, 1, NULL, kTabletId, NULL, NULL, false);
+  InsertTestRowsRemote(0, key, 1, 1, nullptr, kTabletId, nullptr, nullptr, false);
   controller.Reset();
   ASSERT_OK(proxy_->Checksum(req, &resp, &controller));
   total_crc += CalcTestRowChecksum(key, false);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/tablet_service.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_service.cc b/src/kudu/tserver/tablet_service.cc
index 4bcd25a..7aedaf9 100644
--- a/src/kudu/tserver/tablet_service.cc
+++ b/src/kudu/tserver/tablet_service.cc
@@ -451,7 +451,7 @@ class ScanResultChecksummer : public ScanResultCollector {
     }
 
     uint64_t row_crc = 0;
-    crc_->Compute(tmp_buf_.data(), tmp_buf_.size(), &row_crc, NULL);
+    crc_->Compute(tmp_buf_.data(), tmp_buf_.size(), &row_crc, nullptr);
     return static_cast<uint32_t>(row_crc); // CRC32 only uses the lower 32 bits.
   }
 
@@ -611,7 +611,7 @@ void TabletServiceAdminImpl::CreateTablet(const CreateTabletRequestPB* req,
                                                  schema,
                                                  partition_schema,
                                                  req->config(),
-                                                 NULL);
+                                                 nullptr);
   if (PREDICT_FALSE(!s.ok())) {
     TabletServerErrorPB::Code code;
     if (s.IsAlreadyPresent()) {
@@ -1251,8 +1251,8 @@ static Status SetupScanSpec(const NewScanRequestPB& scan_pb,
       InsertOrDie(&missing_col_names, col.name());
     }
 
-    const void* lower_bound = NULL;
-    const void* upper_bound = NULL;
+    const void* lower_bound = nullptr;
+    const void* upper_bound = nullptr;
     if (pred_pb.has_lower_bound()) {
       const void* val;
       RETURN_NOT_OK(ExtractPredicateValue(col, pred_pb.lower_bound(),
@@ -1260,7 +1260,7 @@ static Status SetupScanSpec(const NewScanRequestPB& scan_pb,
                                           &val));
       lower_bound = val;
     } else {
-      lower_bound = NULL;
+      lower_bound = nullptr;
     }
     if (pred_pb.has_upper_bound()) {
       const void* val;
@@ -1269,7 +1269,7 @@ static Status SetupScanSpec(const NewScanRequestPB& scan_pb,
                                           &val));
       upper_bound = val;
     } else {
-      upper_bound = NULL;
+      upper_bound = nullptr;
     }
 
     ColumnRangePredicate pred(col, lower_bound, upper_bound);
@@ -1308,8 +1308,8 @@ Status TabletServiceImpl::HandleNewScanRequest(TabletPeer* tablet_peer,
                                                Timestamp* snap_timestamp,
                                                bool* has_more_results,
                                                TabletServerErrorPB::Code* error_code) {
-  DCHECK(result_collector != NULL);
-  DCHECK(error_code != NULL);
+  DCHECK(result_collector != nullptr);
+  DCHECK(error_code != nullptr);
   DCHECK(req->has_new_scan_request());
   const NewScanRequestPB& scan_pb = req->new_scan_request();
   TRACE_EVENT1("tserver", "TabletServiceImpl::HandleNewScanRequest",

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/ts_tablet_manager-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/ts_tablet_manager-test.cc b/src/kudu/tserver/ts_tablet_manager-test.cc
index ea1876f..b058541 100644
--- a/src/kudu/tserver/ts_tablet_manager-test.cc
+++ b/src/kudu/tserver/ts_tablet_manager-test.cc
@@ -170,7 +170,7 @@ TEST_F(TsTabletManagerTest, TestTabletReports) {
   tablet_manager_->MarkTabletReportAcknowledged(report);
 
   // Create a tablet and do another incremental report - should include the tablet.
-  ASSERT_OK(CreateNewTablet("tablet-1", schema_, NULL));
+  ASSERT_OK(CreateNewTablet("tablet-1", schema_, nullptr));
   int updated_tablets = 0;
   while (updated_tablets != 1) {
     tablet_manager_->GenerateIncrementalTabletReport(&report);
@@ -198,7 +198,7 @@ TEST_F(TsTabletManagerTest, TestTabletReports) {
   tablet_manager_->MarkTabletReportAcknowledged(report);
 
   // Create a second tablet, and ensure the incremental report shows it.
-  ASSERT_OK(CreateNewTablet("tablet-2", schema_, NULL));
+  ASSERT_OK(CreateNewTablet("tablet-2", schema_, nullptr));
 
   // Wait up to 10 seconds to get a tablet report from tablet-2.
   // TabletPeer does not mark tablets dirty until after it commits the

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/ts_tablet_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/ts_tablet_manager.cc b/src/kudu/tserver/ts_tablet_manager.cc
index e4f5ce9..c3ebdd9 100644
--- a/src/kudu/tserver/ts_tablet_manager.cc
+++ b/src/kudu/tserver/ts_tablet_manager.cc
@@ -789,7 +789,7 @@ int TSTabletManager::GetNumDirtyTabletsForTests() const {
 
 void TSTabletManager::MarkDirtyUnlocked(const std::string& tablet_id, const std::string& reason) {
   TabletReportState* state = FindOrNull(dirty_tablets_, tablet_id);
-  if (state != NULL) {
+  if (state != nullptr) {
     CHECK_GE(next_report_seq_, state->change_seq);
     state->change_seq = next_report_seq_;
   } else {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tserver/tserver-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tserver-path-handlers.cc b/src/kudu/tserver/tserver-path-handlers.cc
index d5df150..96dc5e9 100644
--- a/src/kudu/tserver/tserver-path-handlers.cc
+++ b/src/kudu/tserver/tserver-path-handlers.cc
@@ -126,7 +126,7 @@ void TabletServerPathHandlers::HandleTransactionsPage(const Webserver::WebReques
   for (const scoped_refptr<TabletPeer>& peer : peers) {
     vector<TransactionStatusPB> inflight;
 
-    if (peer->tablet() == NULL) {
+    if (peer->tablet() == nullptr) {
       continue;
     }
 
@@ -196,7 +196,7 @@ void TabletServerPathHandlers::HandleTabletsPage(const Webserver::WebRequest& re
     string id = status.tablet_id();
     string table_name = status.table_name();
     string tablet_id_or_link;
-    if (peer->tablet() != NULL) {
+    if (peer->tablet() != nullptr) {
       tablet_id_or_link = TabletLink(id);
     } else {
       tablet_id_or_link = EscapeForHtmlToString(id);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/cache-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/cache-test.cc b/src/kudu/util/cache-test.cc
index 5b68efe..1aec114 100644
--- a/src/kudu/util/cache-test.cc
+++ b/src/kudu/util/cache-test.cc
@@ -93,8 +93,8 @@ class CacheTest : public KuduTest,
 
   int Lookup(int key) {
     Cache::Handle* handle = cache_->Lookup(EncodeKey(key), Cache::EXPECT_IN_CACHE);
-    const int r = (handle == NULL) ? -1 : DecodeValue(cache_->Value(handle));
-    if (handle != NULL) {
+    const int r = (handle == nullptr) ? -1 : DecodeValue(cache_->Value(handle));
+    if (handle != nullptr) {
       cache_->Release(handle);
     }
     return r;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/cache.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/cache.cc b/src/kudu/util/cache.cc
index 2dc12b1..75f5159 100644
--- a/src/kudu/util/cache.cc
+++ b/src/kudu/util/cache.cc
@@ -88,7 +88,7 @@ struct LRUHandle {
 // 4.4.3's builtin hashtable.
 class HandleTable {
  public:
-  HandleTable() : length_(0), elems_(0), list_(NULL) { Resize(); }
+  HandleTable() : length_(0), elems_(0), list_(nullptr) { Resize(); }
   ~HandleTable() { delete[] list_; }
 
   LRUHandle* Lookup(const Slice& key, uint32_t hash) {
@@ -98,9 +98,9 @@ class HandleTable {
   LRUHandle* Insert(LRUHandle* h) {
     LRUHandle** ptr = FindPointer(h->key(), h->hash);
     LRUHandle* old = *ptr;
-    h->next_hash = (old == NULL ? NULL : old->next_hash);
+    h->next_hash = (old == nullptr ? nullptr : old->next_hash);
     *ptr = h;
-    if (old == NULL) {
+    if (old == nullptr) {
       ++elems_;
       if (elems_ > length_) {
         // Since each cache entry is fairly large, we aim for a small
@@ -114,7 +114,7 @@ class HandleTable {
   LRUHandle* Remove(const Slice& key, uint32_t hash) {
     LRUHandle** ptr = FindPointer(key, hash);
     LRUHandle* result = *ptr;
-    if (result != NULL) {
+    if (result != nullptr) {
       *ptr = result->next_hash;
       --elems_;
     }
@@ -133,7 +133,7 @@ class HandleTable {
   // pointer to the trailing slot in the corresponding linked list.
   LRUHandle** FindPointer(const Slice& key, uint32_t hash) {
     LRUHandle** ptr = &list_[hash & (length_ - 1)];
-    while (*ptr != NULL &&
+    while (*ptr != nullptr &&
            ((*ptr)->hash != hash || key != (*ptr)->key())) {
       ptr = &(*ptr)->next_hash;
     }
@@ -150,7 +150,7 @@ class HandleTable {
     uint32_t count = 0;
     for (uint32_t i = 0; i < length_; i++) {
       LRUHandle* h = list_[i];
-      while (h != NULL) {
+      while (h != nullptr) {
         LRUHandle* next = h->next_hash;
         uint32_t hash = h->hash;
         LRUHandle** ptr = &new_list[hash & (new_length - 1)];
@@ -216,7 +216,7 @@ class LRUCache {
 LRUCache::LRUCache(MemTracker* tracker)
  : usage_(0),
    mem_tracker_(tracker),
-   metrics_(NULL) {
+   metrics_(nullptr) {
   // Make empty circular linked list
   lru_.next = &lru_;
   lru_.prev = &lru_;
@@ -269,7 +269,7 @@ Cache::Handle* LRUCache::Lookup(const Slice& key, uint32_t hash, bool caching) {
   {
     lock_guard<MutexType> l(&mutex_);
     e = table_.Lookup(key, hash);
-    if (e != NULL) {
+    if (e != nullptr) {
       base::RefCountInc(&e->refs);
       LRU_Remove(e);
       LRU_Append(e);
@@ -279,7 +279,7 @@ Cache::Handle* LRUCache::Lookup(const Slice& key, uint32_t hash, bool caching) {
   // Do the metrics outside of the lock.
   if (metrics_) {
     metrics_->lookups->Increment();
-    bool was_hit = (e != NULL);
+    bool was_hit = (e != nullptr);
     if (was_hit) {
       if (caching) {
         metrics_->cache_hits_caching->Increment();
@@ -312,7 +312,7 @@ Cache::Handle* LRUCache::Insert(
 
   LRUHandle* e = reinterpret_cast<LRUHandle*>(
       malloc(sizeof(LRUHandle)-1 + key.size()));
-  LRUHandle* to_remove_head = NULL;
+  LRUHandle* to_remove_head = nullptr;
 
   e->value = value;
   e->deleter = deleter;
@@ -333,7 +333,7 @@ Cache::Handle* LRUCache::Insert(
     LRU_Append(e);
 
     LRUHandle* old = table_.Insert(e);
-    if (old != NULL) {
+    if (old != nullptr) {
       LRU_Remove(old);
       if (Unref(old)) {
         old->next = to_remove_head;
@@ -354,7 +354,7 @@ Cache::Handle* LRUCache::Insert(
 
   // we free the entries here outside of mutex for
   // performance reasons
-  while (to_remove_head != NULL) {
+  while (to_remove_head != nullptr) {
     LRUHandle* next = to_remove_head->next;
     FreeEntry(to_remove_head);
     to_remove_head = next;
@@ -369,7 +369,7 @@ void LRUCache::Erase(const Slice& key, uint32_t hash) {
   {
     lock_guard<MutexType> l(&mutex_);
     e = table_.Remove(key, hash);
-    if (e != NULL) {
+    if (e != nullptr) {
       LRU_Remove(e);
       last_reference = Unref(e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/callback_bind-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/callback_bind-test.cc b/src/kudu/util/callback_bind-test.cc
index cd58deb..ded1b3a 100644
--- a/src/kudu/util/callback_bind-test.cc
+++ b/src/kudu/util/callback_bind-test.cc
@@ -62,7 +62,7 @@ struct RefCountable {
 TEST(CallbackBindTest, TestClassMethod) {
   scoped_refptr<Ref> ref = new Ref();
   Callback<int(void)> ref_cb = Bind(&Ref::Foo, ref);
-  ref = NULL;
+  ref = nullptr;
   ASSERT_EQ(3, ref_cb.Run());
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/coding.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/coding.cc b/src/kudu/util/coding.cc
index 7caf0fe..bd3cfcd 100644
--- a/src/kudu/util/coding.cc
+++ b/src/kudu/util/coding.cc
@@ -72,14 +72,14 @@ const uint8_t *GetVarint32PtrFallback(const uint8_t *p,
       return p;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 bool GetVarint32(Slice* input, uint32_t* value) {
   const uint8_t *p = input->data();
   const uint8_t *limit = p + input->size();
   const uint8_t *q = GetVarint32Ptr(p, limit, value);
-  if (q == NULL) {
+  if (q == nullptr) {
     return false;
   } else {
     *input = Slice(q, limit - q);
@@ -101,14 +101,14 @@ const uint8_t *GetVarint64Ptr(const uint8_t *p, const uint8_t *limit, uint64_t*
       return p;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 bool GetVarint64(Slice* input, uint64_t* value) {
   const uint8_t *p = input->data();
   const uint8_t *limit = p + input->size();
   const uint8_t *q = GetVarint64Ptr(p, limit, value);
-  if (q == NULL) {
+  if (q == nullptr) {
     return false;
   } else {
     *input = Slice(q, limit - q);
@@ -120,8 +120,8 @@ const uint8_t *GetLengthPrefixedSlice(const uint8_t *p, const uint8_t *limit,
                                    Slice* result) {
   uint32_t len = 0;
   p = GetVarint32Ptr(p, limit, &len);
-  if (p == NULL) return NULL;
-  if (p + len > limit) return NULL;
+  if (p == nullptr) return nullptr;
+  if (p + len > limit) return nullptr;
   *result = Slice(p, len);
   return p + len;
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/condition_variable.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/condition_variable.cc b/src/kudu/util/condition_variable.cc
index 74eb583..13d1d36 100644
--- a/src/kudu/util/condition_variable.cc
+++ b/src/kudu/util/condition_variable.cc
@@ -36,7 +36,7 @@ ConditionVariable::ConditionVariable(Mutex* user_lock)
   rv = pthread_cond_init(&condition_, &attrs);
   pthread_condattr_destroy(&attrs);
 #else
-  rv = pthread_cond_init(&condition_, NULL);
+  rv = pthread_cond_init(&condition_, nullptr);
 #endif
   DCHECK_EQ(0, rv);
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/crc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/crc.cc b/src/kudu/util/crc.cc
index a5fa7d4..7be2709 100644
--- a/src/kudu/util/crc.cc
+++ b/src/kudu/util/crc.cc
@@ -27,12 +27,12 @@ namespace crc {
 using debug::ScopedLeakCheckDisabler;
 
 static GoogleOnceType crc32c_once = GOOGLE_ONCE_INIT;
-static Crc* crc32c_instance = NULL;
+static Crc* crc32c_instance = nullptr;
 
 static void InitCrc32cInstance() {
   ScopedLeakCheckDisabler disabler; // CRC instance is never freed.
   // TODO: Is initial = 0 and roll window = 4 appropriate for all cases?
-  crc32c_instance = crcutil_interface::CRC::CreateCrc32c(true, 0, 4, NULL);
+  crc32c_instance = crcutil_interface::CRC::CreateCrc32c(true, 0, 4, nullptr);
 }
 
 Crc* GetCrc32cInstance() {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/curl_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/curl_util.cc b/src/kudu/util/curl_util.cc
index d3ac58a..d3265b8 100644
--- a/src/kudu/util/curl_util.cc
+++ b/src/kudu/util/curl_util.cc
@@ -54,7 +54,7 @@ EasyCurl::~EasyCurl() {
 }
 
 Status EasyCurl::FetchURL(const std::string& url, faststring* buf) {
-  return DoRequest(url, NULL, buf);
+  return DoRequest(url, nullptr, buf);
 }
 
 Status EasyCurl::PostToURL(const std::string& url,

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/debug-util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug-util-test.cc b/src/kudu/util/debug-util-test.cc
index f6bfd33..a4563da 100644
--- a/src/kudu/util/debug-util-test.cc
+++ b/src/kudu/util/debug-util-test.cc
@@ -59,7 +59,7 @@ void fake_signal_handler(int signum) {}
 
 bool IsSignalHandlerRegistered(int signum) {
   struct sigaction cur_action;
-  CHECK_EQ(0, sigaction(signum, NULL, &cur_action));
+  CHECK_EQ(0, sigaction(signum, nullptr, &cur_action));
   return cur_action.sa_handler != SIG_DFL;
 }
 } // anonymous namespace

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/debug-util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug-util.cc b/src/kudu/util/debug-util.cc
index d13fb94..daabc8a 100644
--- a/src/kudu/util/debug-util.cc
+++ b/src/kudu/util/debug-util.cc
@@ -140,7 +140,7 @@ bool InitSignalHandlerUnlocked(int signum) {
   // change our signal, unregister the old one.
   if (signum != g_stack_trace_signum && state == INITIALIZED) {
     struct sigaction old_act;
-    PCHECK(sigaction(g_stack_trace_signum, NULL, &old_act) == 0);
+    PCHECK(sigaction(g_stack_trace_signum, nullptr, &old_act) == 0);
     if (old_act.sa_handler == &HandleStackTraceSignal) {
       signal(g_stack_trace_signum, SIG_DFL);
     }
@@ -155,7 +155,7 @@ bool InitSignalHandlerUnlocked(int signum) {
 
   if (state == UNINITIALIZED) {
     struct sigaction old_act;
-    PCHECK(sigaction(g_stack_trace_signum, NULL, &old_act) == 0);
+    PCHECK(sigaction(g_stack_trace_signum, nullptr, &old_act) == 0);
     if (old_act.sa_handler != SIG_DFL &&
         old_act.sa_handler != SIG_IGN) {
       state = INIT_ERROR;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/debug/trace_event_impl.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug/trace_event_impl.cc b/src/kudu/util/debug/trace_event_impl.cc
index 22cbe62..4246d75 100644
--- a/src/kudu/util/debug/trace_event_impl.cc
+++ b/src/kudu/util/debug/trace_event_impl.cc
@@ -46,7 +46,7 @@ using base::SpinLockHolder;
 using strings::SubstituteAndAppend;
 using std::string;
 
-__thread TraceLog::PerThreadInfo* TraceLog::thread_local_info_ = NULL;
+__thread TraceLog::PerThreadInfo* TraceLog::thread_local_info_ = nullptr;
 
 namespace {
 
@@ -127,7 +127,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
       chunks_.resize(*index + 1);
 
     TraceBufferChunk* chunk = chunks_[*index];
-    chunks_[*index] = NULL;  // Put NULL in the slot of a in-flight chunk.
+    chunks_[*index] = nullptr;  // Put NULL in the slot of a in-flight chunk.
     if (chunk)
       chunk->Reset(current_chunk_seq_++);
     else
@@ -164,16 +164,16 @@ class TraceBufferRingBuffer : public TraceBuffer {
 
   virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) OVERRIDE {
     if (handle.chunk_index >= chunks_.size())
-      return NULL;
+      return nullptr;
     TraceBufferChunk* chunk = chunks_[handle.chunk_index];
     if (!chunk || chunk->seq() != handle.chunk_seq)
-      return NULL;
+      return nullptr;
     return chunk->GetEventAt(handle.event_index);
   }
 
   virtual const TraceBufferChunk* NextChunk() OVERRIDE {
     if (chunks_.empty())
-      return NULL;
+      return nullptr;
 
     while (current_iteration_index_ != queue_tail_) {
       size_t chunk_index = recyclable_chunks_queue_[current_iteration_index_];
@@ -183,7 +183,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
       DCHECK(chunks_[chunk_index]);
       return chunks_[chunk_index];
     }
-    return NULL;
+    return nullptr;
   }
 
   virtual gscoped_ptr<TraceBuffer> CloneForIteration() const OVERRIDE {
@@ -194,7 +194,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
       if (chunk_index >= chunks_.size()) // Skip uninitialized chunks.
         continue;
       TraceBufferChunk* chunk = chunks_[chunk_index];
-      cloned_buffer->chunks_.push_back(chunk ? chunk->Clone().release() : NULL);
+      cloned_buffer->chunks_.push_back(chunk ? chunk->Clone().release() : nullptr);
     }
     return cloned_buffer.PassAs<TraceBuffer>();
   }
@@ -210,7 +210,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
     // The only implemented method.
     virtual const TraceBufferChunk* NextChunk() OVERRIDE {
       return current_iteration_index_ < chunks_.size() ?
-          chunks_[current_iteration_index_++] : NULL;
+          chunks_[current_iteration_index_++] : nullptr;
     }
 
     virtual gscoped_ptr<TraceBufferChunk> GetChunk(size_t* index) OVERRIDE {
@@ -225,7 +225,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
     virtual size_t Size() const OVERRIDE { return 0; }
     virtual size_t Capacity() const OVERRIDE { return 0; }
     virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) OVERRIDE {
-      return NULL;
+      return nullptr;
     }
     virtual gscoped_ptr<TraceBuffer> CloneForIteration() const OVERRIDE {
       NOTIMPLEMENTED();
@@ -291,7 +291,7 @@ class TraceBufferVector : public TraceBuffer {
     // have to add the metadata events and flush thread-local buffers even if
     // the buffer is full.
     *index = chunks_.size();
-    chunks_.push_back(NULL);  // Put NULL in the slot of a in-flight chunk.
+    chunks_.push_back(nullptr);  // Put NULL in the slot of a in-flight chunk.
     ++in_flight_chunk_count_;
     // + 1 because zero chunk_seq is not allowed.
     return gscoped_ptr<TraceBufferChunk>(
@@ -322,10 +322,10 @@ class TraceBufferVector : public TraceBuffer {
 
   virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) OVERRIDE {
     if (handle.chunk_index >= chunks_.size())
-      return NULL;
+      return nullptr;
     TraceBufferChunk* chunk = chunks_[handle.chunk_index];
     if (!chunk || chunk->seq() != handle.chunk_seq)
-      return NULL;
+      return nullptr;
     return chunk->GetEventAt(handle.event_index);
   }
 
@@ -336,7 +336,7 @@ class TraceBufferVector : public TraceBuffer {
       if (chunk)
         return chunk;
     }
-    return NULL;
+    return nullptr;
   }
 
   virtual gscoped_ptr<TraceBuffer> CloneForIteration() const OVERRIDE {
@@ -368,7 +368,7 @@ void InitializeMetadataEvent(TraceEvent* trace_event,
                           MicrosecondsInt64(0), MicrosecondsInt64(0), TRACE_EVENT_PHASE_METADATA,
                           &g_category_group_enabled[g_category_metadata],
                           metadata_name, ::trace_event_internal::kNoEventId,
-                          num_args, &arg_name, &arg_type, &arg_value, NULL,
+                          num_args, &arg_name, &arg_type, &arg_value, nullptr,
                           TRACE_EVENT_FLAG_NONE);
 }
 
@@ -498,13 +498,13 @@ TraceEvent::TraceEvent()
     : duration_(-1),
       thread_duration_(-1),
       id_(0u),
-      category_group_enabled_(NULL),
-      name_(NULL),
+      category_group_enabled_(nullptr),
+      name_(nullptr),
       thread_id_(0),
       phase_(TRACE_EVENT_PHASE_BEGIN),
       flags_(0) {
   for (int i = 0; i < kTraceMaxNumArgs; ++i)
-    arg_names_[i] = NULL;
+    arg_names_[i] = nullptr;
   memset(arg_values_, 0, sizeof(arg_values_));
 }
 
@@ -568,9 +568,9 @@ void TraceEvent::Initialize(
       arg_values_[i].as_uint = arg_values[i];
   }
   for (; i < kTraceMaxNumArgs; ++i) {
-    arg_names_[i] = NULL;
+    arg_names_[i] = nullptr;
     arg_values_[i].as_uint = 0u;
-    convertable_values_[i] = NULL;
+    convertable_values_[i] = nullptr;
     arg_types_[i] = TRACE_VALUE_TYPE_UINT;
   }
 
@@ -622,9 +622,9 @@ void TraceEvent::Reset() {
   // Only reset fields that won't be initialized in Initialize(), or that may
   // hold references to other objects.
   duration_ = -1;;
-  parameter_copy_storage_ = NULL;
+  parameter_copy_storage_ = nullptr;
   for (int i = 0; i < kTraceMaxNumArgs && arg_names_[i]; ++i)
-    convertable_values_[i] = NULL;
+    convertable_values_[i] = nullptr;
 }
 
 void TraceEvent::UpdateDuration(const MicrosecondsInt64& now,
@@ -963,7 +963,7 @@ void TraceSamplingThread::DefaultSamplingCallback(
   ExtractCategoryAndName(combined, &category_group, &name);
   TRACE_EVENT_API_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_SAMPLE,
       TraceLog::GetCategoryGroupEnabled(category_group),
-      name, 0, 0, NULL, NULL, NULL, NULL, 0);
+      name, 0, 0, nullptr, nullptr, nullptr, nullptr, 0);
 }
 
 void TraceSamplingThread::GetSamples() {
@@ -1024,7 +1024,7 @@ class TraceLog::ThreadLocalEventBuffer {
   TraceEvent* GetEventByHandle(TraceEventHandle handle) {
     if (!chunk_ || handle.chunk_seq != chunk_->seq() ||
         handle.chunk_index != chunk_index_)
-      return NULL;
+      return nullptr;
 
     return chunk_->GetEventAt(handle.event_index);
   }
@@ -1078,7 +1078,7 @@ TraceEvent* TraceLog::ThreadLocalEventBuffer::AddTraceEvent(
     trace_log_->CheckIfBufferIsFullWhileLocked();
   }
   if (!chunk_)
-    return NULL;
+    return nullptr;
 
   size_t event_index;
   TraceEvent* trace_event = chunk_->AddTraceEvent(&event_index);
@@ -1116,7 +1116,7 @@ TraceLog::TraceLog()
       time_offset_(0),
       watch_category_(0),
       trace_options_(RECORD_UNTIL_FULL),
-      sampling_thread_handle_(0),
+      sampling_thread_handle_(nullptr),
       category_filter_(CategoryFilter::kDefaultCategoryFilterString),
       event_callback_category_filter_(
           CategoryFilter::kDefaultCategoryFilterString),
@@ -1238,7 +1238,7 @@ const unsigned char* TraceLog::GetCategoryGroupEnabledInternal(
     }
   }
 
-  unsigned char* category_group_enabled = NULL;
+  unsigned char* category_group_enabled = nullptr;
   // This is the slow path: the lock is not held in the case above, so more
   // than one thread could have reached here trying to add the same category.
   // Only hold to lock when actually appending a new category, and
@@ -1486,7 +1486,7 @@ TraceEvent* TraceLog::AddEventToThreadSharedChunkWhileLocked(
       CheckIfBufferIsFullWhileLocked();
   }
   if (!thread_shared_chunk_)
-    return NULL;
+    return nullptr;
 
   size_t event_index;
   TraceEvent* trace_event = thread_shared_chunk_->AddTraceEvent(&event_index);
@@ -1709,7 +1709,7 @@ TraceLog::PerThreadInfo* TraceLog::SetupThreadLocalBuffer() {
   int64_t cur_tid = Thread::UniqueThreadId();
 
   PerThreadInfo* thr_info = new PerThreadInfo();
-  thr_info->event_buffer_ = NULL;
+  thr_info->event_buffer_ = nullptr;
   thr_info->is_in_trace_event_ = 0;
   thread_local_info_ = thr_info;
 
@@ -1802,7 +1802,7 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp(
     // take the buffer.
     thread_local_event_buffer = thr_info->AtomicTakeBuffer();
     delete thread_local_event_buffer;
-    thread_local_event_buffer = NULL;
+    thread_local_event_buffer = nullptr;
   }
 
   // If there is no current buffer, create one for this event.
@@ -2027,7 +2027,7 @@ void TraceLog::UpdateTraceEventDuration(
       base::subtle::NoBarrier_Load(&event_callback_));
     if (event_callback) {
       event_callback(now, TRACE_EVENT_PHASE_END, category_group_enabled, name,
-                     trace_event_internal::kNoEventId, 0, NULL, NULL, NULL,
+                     trace_event_internal::kNoEventId, 0, nullptr, nullptr, nullptr,
                      TRACE_EVENT_FLAG_NONE);
     }
   }
@@ -2056,7 +2056,7 @@ void TraceLog::AddMetadataEventsWhileLocked() {
   DCHECK(lock_.IsHeld());
 
 #if !defined(OS_NACL)  // NaCl shouldn't expose the process id.
-  InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+  InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(nullptr, false),
                           0,
                           "num_cpus", "number",
                           base::NumCPUs());
@@ -2065,14 +2065,14 @@ void TraceLog::AddMetadataEventsWhileLocked() {
 
   int current_thread_id = static_cast<int>(kudu::Thread::UniqueThreadId());
   if (process_sort_index_ != 0) {
-    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(nullptr, false),
                             current_thread_id,
                             "process_sort_index", "sort_index",
                             process_sort_index_);
   }
 
   if (process_name_.size()) {
-    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(nullptr, false),
                             current_thread_id,
                             "process_name", "name",
                             process_name_);
@@ -2085,7 +2085,7 @@ void TraceLog::AddMetadataEventsWhileLocked() {
         it++) {
       labels.push_back(it->second);
     }
-    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(nullptr, false),
                             current_thread_id,
                             "process_labels", "labels",
                             JoinStrings(labels, ","));
@@ -2097,7 +2097,7 @@ void TraceLog::AddMetadataEventsWhileLocked() {
       it++) {
     if (it->second == 0)
       continue;
-    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(nullptr, false),
                             it->first,
                             "thread_sort_index", "sort_index",
                             it->second);
@@ -2110,7 +2110,7 @@ void TraceLog::AddMetadataEventsWhileLocked() {
       it++) {
     if (it->second.empty())
       continue;
-    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+    InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(nullptr, false),
                             it->first,
                             "thread_name", "name",
                             it->second);
@@ -2119,7 +2119,7 @@ void TraceLog::AddMetadataEventsWhileLocked() {
 
 
 TraceEvent* TraceLog::GetEventByHandle(TraceEventHandle handle) {
-  return GetEventByHandleInternal(handle, NULL);
+  return GetEventByHandleInternal(handle, nullptr);
 }
 
 TraceEvent* TraceLog::GetEventByHandleInternal(TraceEventHandle handle,
@@ -2127,7 +2127,7 @@ TraceEvent* TraceLog::GetEventByHandleInternal(TraceEventHandle handle,
   TraceLog::PerThreadInfo* thr_info = TraceLog::thread_local_info_;
 
   if (!handle.chunk_seq)
-    return NULL;
+    return nullptr;
 
   if (thr_info) {
     ThreadLocalEventBuffer* buf =
@@ -2152,7 +2152,7 @@ TraceEvent* TraceLog::GetEventByHandleInternal(TraceEventHandle handle,
   if (thread_shared_chunk_ &&
       handle.chunk_index == thread_shared_chunk_index_) {
     return handle.chunk_seq == thread_shared_chunk_->seq() ?
-        thread_shared_chunk_->GetEventAt(handle.event_index) : NULL;
+        thread_shared_chunk_->GetEventAt(handle.event_index) : nullptr;
   }
 
   return logged_events_->GetEventByHandle(handle);
@@ -2420,7 +2420,7 @@ ScopedTraceBinaryEfficient::ScopedTraceBinaryEfficient(
             trace_event_internal::kNoEventId,
             static_cast<int>(kudu::Thread::UniqueThreadId()),
             GetMonoTimeMicros(),
-            0, NULL, NULL, NULL, NULL, TRACE_EVENT_FLAG_NONE);
+            0, nullptr, nullptr, nullptr, nullptr, TRACE_EVENT_FLAG_NONE);
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/debug/trace_event_synthetic_delay.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug/trace_event_synthetic_delay.cc b/src/kudu/util/debug/trace_event_synthetic_delay.cc
index c228fba..4669234 100644
--- a/src/kudu/util/debug/trace_event_synthetic_delay.cc
+++ b/src/kudu/util/debug/trace_event_synthetic_delay.cc
@@ -39,7 +39,7 @@ class TraceEventSyntheticDelayRegistry : public TraceEventSyntheticDelayClock {
 };
 
 TraceEventSyntheticDelay::TraceEventSyntheticDelay()
-    : mode_(STATIC), begin_count_(0), trigger_count_(0), clock_(NULL) {}
+    : mode_(STATIC), begin_count_(0), trigger_count_(0), clock_(nullptr) {}
 
 TraceEventSyntheticDelay::~TraceEventSyntheticDelay() {}
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/env-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env-test.cc b/src/kudu/util/env-test.cc
index d9ca45d..dd58d2e 100644
--- a/src/kudu/util/env-test.cc
+++ b/src/kudu/util/env-test.cc
@@ -678,7 +678,7 @@ TEST_F(TestEnv, TestCanonicalize) {
   ASSERT_OK(env_->Canonicalize(dir + "/", &result));
   ASSERT_EQ(dir, result);
 
-  ASSERT_TRUE(env_->Canonicalize(dir + "/bar", NULL).IsNotFound());
+  ASSERT_TRUE(env_->Canonicalize(dir + "/bar", nullptr).IsNotFound());
 }
 
 TEST_F(TestEnv, TestGetTotalRAMBytes) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/env_posix.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_posix.cc b/src/kudu/util/env_posix.cc
index 1570c18..4c96e46 100644
--- a/src/kudu/util/env_posix.cc
+++ b/src/kudu/util/env_posix.cc
@@ -677,7 +677,7 @@ class PosixEnv : public Env {
     TRACE_EVENT1("io", "PosixEnv::NewSequentialFile", "path", fname);
     ThreadRestrictions::AssertIOAllowed();
     FILE* f = fopen(fname.c_str(), "r");
-    if (f == NULL) {
+    if (f == nullptr) {
       return IOError(fname, errno);
     } else {
       result->reset(new PosixSequentialFile(fname, f));
@@ -762,12 +762,12 @@ class PosixEnv : public Env {
     ThreadRestrictions::AssertIOAllowed();
     result->clear();
     DIR* d = opendir(dir.c_str());
-    if (d == NULL) {
+    if (d == nullptr) {
       return IOError(dir, errno);
     }
     struct dirent* entry;
     // TODO: lint: Consider using readdir_r(...) instead of readdir(...) for improved thread safety.
-    while ((entry = readdir(d)) != NULL) {
+    while ((entry = readdir(d)) != nullptr) {
       result->push_back(entry->d_name);
     }
     closedir(d);
@@ -881,7 +881,7 @@ class PosixEnv : public Env {
   virtual Status LockFile(const std::string& fname, FileLock** lock) OVERRIDE {
     TRACE_EVENT1("io", "PosixEnv::LockFile", "path", fname);
     ThreadRestrictions::AssertIOAllowed();
-    *lock = NULL;
+    *lock = nullptr;
     Status result;
     int fd = open(fname.c_str(), O_RDWR | O_CREAT, 0644);
     if (fd < 0) {
@@ -938,7 +938,7 @@ class PosixEnv : public Env {
 
   virtual uint64_t NowMicros() OVERRIDE {
     struct timeval tv;
-    gettimeofday(&tv, NULL);
+    gettimeofday(&tv, nullptr);
     return static_cast<uint64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
   }
 
@@ -1003,18 +1003,18 @@ class PosixEnv : public Env {
     // FTS requires a non-const copy of the name. strdup it and free() when
     // we leave scope.
     gscoped_ptr<char, FreeDeleter> name_dup(strdup(root.c_str()));
-    char *(paths[]) = { name_dup.get(), NULL };
+    char *(paths[]) = { name_dup.get(), nullptr };
 
     // FTS_NOCHDIR is important here to make this thread-safe.
     gscoped_ptr<FTS, FtsCloser> tree(
-        fts_open(paths, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, NULL));
+        fts_open(paths, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, nullptr));
     if (!tree.get()) {
       return IOError(root, errno);
     }
 
-    FTSENT *ent = NULL;
+    FTSENT *ent = nullptr;
     bool had_errors = false;
-    while ((ent = fts_read(tree.get())) != NULL) {
+    while ((ent = fts_read(tree.get())) != nullptr) {
       bool doCb = false;
       FileType type = DIRECTORY_TYPE;
       switch (ent->fts_info) {
@@ -1063,7 +1063,7 @@ class PosixEnv : public Env {
   virtual Status Canonicalize(const string& path, string* result) OVERRIDE {
     TRACE_EVENT1("io", "PosixEnv::Canonicalize", "path", path);
     ThreadRestrictions::AssertIOAllowed();
-    gscoped_ptr<char[], FreeDeleter> r(realpath(path.c_str(), NULL));
+    gscoped_ptr<char[], FreeDeleter> r(realpath(path.c_str(), nullptr));
     if (!r) {
       return IOError(path, errno);
     }
@@ -1079,7 +1079,7 @@ class PosixEnv : public Env {
     // Get the Physical memory size
     mib[0] = CTL_HW;
     mib[1] = HW_MEMSIZE;
-    CHECK_ERR(sysctl(mib, 2, ram, &length, NULL, 0)) << "sysctl CTL_HW HW_MEMSIZE failed";
+    CHECK_ERR(sysctl(mib, 2, ram, &length, nullptr, 0)) << "sysctl CTL_HW HW_MEMSIZE failed";
 #else
     struct sysinfo info;
     if (sysinfo(&info) < 0) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/env_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_util.cc b/src/kudu/util/env_util.cc
index caf0bfb..e9e8117 100644
--- a/src/kudu/util/env_util.cc
+++ b/src/kudu/util/env_util.cc
@@ -100,7 +100,7 @@ Status ReadFully(RandomAccessFile* file, uint64_t offset, size_t n,
 
 Status CreateDirIfMissing(Env* env, const string& path, bool* created) {
   Status s = env->CreateDir(path);
-  if (created != NULL) {
+  if (created != nullptr) {
     *created = s.ok();
   }
   return s.IsAlreadyPresent() ? Status::OK() : s;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/hdr_histogram.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/hdr_histogram.cc b/src/kudu/util/hdr_histogram.cc
index 97af0bc..43bd2a9 100644
--- a/src/kudu/util/hdr_histogram.cc
+++ b/src/kudu/util/hdr_histogram.cc
@@ -47,7 +47,7 @@ HdrHistogram::HdrHistogram(uint64_t highest_trackable_value, int num_significant
     total_sum_(0),
     min_value_(std::numeric_limits<Atomic64>::max()),
     max_value_(0),
-    counts_(0) {
+    counts_(nullptr) {
   Init();
 }
 
@@ -64,7 +64,7 @@ HdrHistogram::HdrHistogram(const HdrHistogram& other)
     total_sum_(0),
     min_value_(std::numeric_limits<Atomic64>::max()),
     max_value_(0),
-    counts_(0) {
+    counts_(nullptr) {
   Init();
 
   // Not a consistent snapshot but we try to roughly keep it close.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/jsonreader-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/jsonreader-test.cc b/src/kudu/util/jsonreader-test.cc
index eeae025..3c54cc7 100644
--- a/src/kudu/util/jsonreader-test.cc
+++ b/src/kudu/util/jsonreader-test.cc
@@ -47,11 +47,11 @@ TEST(JsonReaderTest, Empty) {
   ASSERT_OK(r2.Init());
 
   // Not found.
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", NULL).IsNotFound());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", NULL).IsNotFound());
-  ASSERT_TRUE(r.ExtractString(r.root(), "foo", NULL).IsNotFound());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "foo", NULL).IsNotFound());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "foo", NULL).IsNotFound());
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", nullptr).IsNotFound());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", nullptr).IsNotFound());
+  ASSERT_TRUE(r.ExtractString(r.root(), "foo", nullptr).IsNotFound());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "foo", nullptr).IsNotFound());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "foo", nullptr).IsNotFound());
 }
 
 TEST(JsonReaderTest, Basic) {
@@ -62,10 +62,10 @@ TEST(JsonReaderTest, Basic) {
   ASSERT_EQ("bar", foo);
 
   // Bad types.
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "foo", NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "foo", nullptr).IsInvalidArgument());
 }
 
 TEST(JsonReaderTest, LessBasic) {
@@ -86,31 +86,31 @@ TEST(JsonReaderTest, LessBasic) {
   ASSERT_EQ("", str);
 
   // Bad types.
-  ASSERT_TRUE(r.ExtractString(r.root(), "small", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "small", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "small", NULL).IsInvalidArgument());
-
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "big", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractString(r.root(), "big", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "big", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "big", NULL).IsInvalidArgument());
-
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "null", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), "null", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "null", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "null", NULL).IsInvalidArgument());
-
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "empty", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), "empty", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "empty", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "empty", NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractString(r.root(), "small", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "small", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "small", nullptr).IsInvalidArgument());
+
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "big", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractString(r.root(), "big", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "big", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "big", nullptr).IsInvalidArgument());
+
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "null", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), "null", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "null", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "null", nullptr).IsInvalidArgument());
+
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "empty", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), "empty", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "empty", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "empty", nullptr).IsInvalidArgument());
 }
 
 TEST(JsonReaderTest, Objects) {
   JsonReader r("{ \"foo\" : { \"1\" : 1 } }");
   ASSERT_OK(r.Init());
 
-  const Value* foo = NULL;
+  const Value* foo = nullptr;
   ASSERT_OK(r.ExtractObject(r.root(), "foo", &foo));
   ASSERT_TRUE(foo);
 
@@ -119,10 +119,10 @@ TEST(JsonReaderTest, Objects) {
   ASSERT_EQ(1, one);
 
   // Bad types.
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractString(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "foo", NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractString(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObjectArray(r.root(), "foo", nullptr).IsInvalidArgument());
 }
 
 TEST(JsonReaderTest, TopLevelArray) {
@@ -130,7 +130,7 @@ TEST(JsonReaderTest, TopLevelArray) {
   ASSERT_OK(r.Init());
 
   vector<const Value*> objs;
-  ASSERT_OK(r.ExtractObjectArray(r.root(), NULL, &objs));
+  ASSERT_OK(r.ExtractObjectArray(r.root(), nullptr, &objs));
   ASSERT_EQ(2, objs.size());
   string name;
   ASSERT_OK(r.ExtractString(objs[0], "name", &name));
@@ -139,10 +139,10 @@ TEST(JsonReaderTest, TopLevelArray) {
   ASSERT_EQ("bar", name);
 
   // Bad types.
-  ASSERT_TRUE(r.ExtractInt32(r.root(), NULL, NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), NULL, NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractString(r.root(), NULL, NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), NULL, NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt32(r.root(), nullptr, NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), nullptr, NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractString(r.root(), nullptr, NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), nullptr, NULL).IsInvalidArgument());
 }
 
 TEST(JsonReaderTest, NestedArray) {
@@ -161,10 +161,10 @@ TEST(JsonReaderTest, NestedArray) {
   }
 
   // Bad types.
-  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractString(r.root(), "foo", NULL).IsInvalidArgument());
-  ASSERT_TRUE(r.ExtractObject(r.root(), "foo", NULL).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt32(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractInt64(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractString(r.root(), "foo", nullptr).IsInvalidArgument());
+  ASSERT_TRUE(r.ExtractObject(r.root(), "foo", nullptr).IsInvalidArgument());
 }
 
 } // namespace kudu

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/kernel_stack_watchdog.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/kernel_stack_watchdog.cc b/src/kudu/util/kernel_stack_watchdog.cc
index 5ec871b..486fc72 100644
--- a/src/kudu/util/kernel_stack_watchdog.cc
+++ b/src/kudu/util/kernel_stack_watchdog.cc
@@ -42,7 +42,7 @@ DEFINE_STATIC_THREAD_LOCAL(KernelStackWatchdog::TLS,
                            KernelStackWatchdog, tls_);
 
 KernelStackWatchdog::KernelStackWatchdog()
-  : log_collector_(NULL),
+  : log_collector_(nullptr),
     finish_(1) {
   CHECK_OK(Thread::Create("kernel-watchdog", "kernel-watcher",
                           boost::bind(&KernelStackWatchdog::RunThread, this),

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/logging.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/logging.cc b/src/kudu/util/logging.cc
index b9a8feb..92e0434 100644
--- a/src/kudu/util/logging.cc
+++ b/src/kudu/util/logging.cc
@@ -104,7 +104,7 @@ SpinLock logging_mutex(base::LINKER_INITIALIZED);
 // There can only be a single instance of a SimpleSink.
 //
 // Protected by 'logging_mutex'.
-SimpleSink* registered_sink = NULL;
+SimpleSink* registered_sink = nullptr;
 
 // Records the logging severity after the first call to
 // InitGoogleLoggingSafe{Basic}. Calls to UnregisterLoggingCallback()
@@ -122,7 +122,7 @@ void UnregisterLoggingCallbackUnlocked() {
   google::SetStderrLogging(initial_stderr_severity);
   google::RemoveLogSink(registered_sink);
   delete registered_sink;
-  registered_sink = NULL;
+  registered_sink = nullptr;
 }
 
 } // anonymous namespace

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/map-util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/map-util-test.cc b/src/kudu/util/map-util-test.cc
index 267dd18..4001f98 100644
--- a/src/kudu/util/map-util-test.cc
+++ b/src/kudu/util/map-util-test.cc
@@ -29,19 +29,19 @@ namespace kudu {
 TEST(FloorTest, TestMapUtil) {
   map<int, int> my_map;
 
-  ASSERT_EQ(NULL, FindFloorOrNull(my_map, 5));
+  ASSERT_EQ(nullptr, FindFloorOrNull(my_map, 5));
 
   my_map[5] = 5;
   ASSERT_EQ(5, *FindFloorOrNull(my_map, 6));
   ASSERT_EQ(5, *FindFloorOrNull(my_map, 5));
-  ASSERT_EQ(NULL, FindFloorOrNull(my_map, 4));
+  ASSERT_EQ(nullptr, FindFloorOrNull(my_map, 4));
 
   my_map[1] = 1;
   ASSERT_EQ(5, *FindFloorOrNull(my_map, 6));
   ASSERT_EQ(5, *FindFloorOrNull(my_map, 5));
   ASSERT_EQ(1, *FindFloorOrNull(my_map, 4));
   ASSERT_EQ(1, *FindFloorOrNull(my_map, 1));
-  ASSERT_EQ(NULL, FindFloorOrNull(my_map, 0));
+  ASSERT_EQ(nullptr, FindFloorOrNull(my_map, 0));
 
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/mem_tracker-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/mem_tracker-test.cc b/src/kudu/util/mem_tracker-test.cc
index 51529e1..2a10bed 100644
--- a/src/kudu/util/mem_tracker-test.cc
+++ b/src/kudu/util/mem_tracker-test.cc
@@ -254,7 +254,7 @@ TEST(MemTrackerTest, SoftLimitExceeded) {
 
   // Consumption is 0; the soft limit is never exceeded.
   for (int i = 0; i < kNumIters; i++) {
-    ASSERT_FALSE(m->SoftLimitExceeded(NULL));
+    ASSERT_FALSE(m->SoftLimitExceeded(nullptr));
   }
 
   // Consumption is half of the actual limit, so we expect to exceed the soft

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/memory/arena.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/memory/arena.cc b/src/kudu/util/memory/arena.cc
index dec8878..822a4f6 100644
--- a/src/kudu/util/memory/arena.cc
+++ b/src/kudu/util/memory/arena.cc
@@ -69,7 +69,7 @@ void *ArenaBase<THREADSAFE>::AllocateBytesFallback(const size_t size, const size
   // a new component, in which case we should try the "fast path" again
   Component* cur = AcquireLoadCurrent();
   void * result = cur->AllocateBytesAligned(size, align);
-  if (PREDICT_FALSE(result != NULL)) return result;
+  if (PREDICT_FALSE(result != nullptr)) return result;
 
   // Really need to allocate more space.
   size_t next_component_size = min(2 * cur->size(), max_buffer_size_);
@@ -89,14 +89,14 @@ void *ArenaBase<THREADSAFE>::AllocateBytesFallback(const size_t size, const size
   CHECK_LE(minimal, next_component_size);
   // Now, just make sure we can actually get the memory.
   Component* component = NewComponent(next_component_size, minimal);
-  if (component == NULL) {
+  if (component == nullptr) {
     component = NewComponent(next_component_size, size);
   }
-  if (!component) return NULL;
+  if (!component) return nullptr;
 
   // Now, must succeed. The component has at least 'size' bytes.
   result = component->AllocateBytesAligned(size, align);
-  CHECK(result != NULL);
+  CHECK(result != nullptr);
 
   // Now add it to the arena.
   AddComponent(component);
@@ -110,7 +110,7 @@ typename ArenaBase<THREADSAFE>::Component* ArenaBase<THREADSAFE>::NewComponent(
   size_t minimum_size) {
   Buffer* buffer = buffer_allocator_->BestEffortAllocate(requested_size,
                                                          minimum_size);
-  if (buffer == NULL) return NULL;
+  if (buffer == nullptr) return nullptr;
 
   CHECK_EQ(reinterpret_cast<uintptr_t>(buffer->data()) & (16 - 1), 0)
     << "Components should be 16-byte aligned: " << buffer->data();

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/memory/memory.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/memory/memory.cc b/src/kudu/util/memory/memory.cc
index 0ef54fc..02065af 100644
--- a/src/kudu/util/memory/memory.cc
+++ b/src/kudu/util/memory/memory.cc
@@ -81,13 +81,13 @@ Buffer::~Buffer() {
                        "BADBADBADBADBADBADBADBADBADBADBAD"
                        "BADBADBADBADBADBADBADBADBADBADBAD");
 #endif
-  if (allocator_ != NULL) allocator_->FreeInternal(this);
+  if (allocator_ != nullptr) allocator_->FreeInternal(this);
 }
 
 void BufferAllocator::LogAllocation(size_t requested,
                                     size_t minimal,
                                     Buffer* buffer) {
-  if (buffer == NULL) {
+  if (buffer == nullptr) {
     LOG(WARNING) << "Memory allocation failed. "
                  << "Number of bytes requested: " << requested
                  << ", minimal: " << minimal;
@@ -122,10 +122,10 @@ Buffer* HeapBufferAllocator::AllocateInternal(
   size_t attempted = requested;
   while (true) {
     data = (attempted == 0) ? &dummy_buffer[0] : Malloc(attempted);
-    if (data != NULL) {
+    if (data != nullptr) {
       return CreateBuffer(data, attempted, originator);
     }
-    if (attempted == minimal) return NULL;
+    if (attempted == minimal) return nullptr;
     attempted = minimal + (attempted - minimal - 1) / 2;
   }
 }
@@ -149,7 +149,7 @@ bool HeapBufferAllocator::ReallocateInternal(
         data = Malloc(attempted);
       }
     }
-    if (data != NULL) {
+    if (data != nullptr) {
       UpdateBuffer(data, attempted, buffer);
       return true;
     }
@@ -166,7 +166,7 @@ void* HeapBufferAllocator::Malloc(size_t size) {
   if (aligned_mode_) {
     void* data;
     if (posix_memalign(&data, 16, KUDU_ALIGN_UP(size, 16))) {
-       return NULL;
+       return nullptr;
     }
     return data;
   } else {
@@ -187,7 +187,7 @@ void* HeapBufferAllocator::Realloc(void* previousData, size_t previousSize,
       free(previousData);
       return data;
     } else {
-      return NULL;
+      return nullptr;
     }
   } else {
     return realloc(previousData, newSize);
@@ -199,7 +199,7 @@ Buffer* ClearingBufferAllocator::AllocateInternal(size_t requested,
                                                   BufferAllocator* originator) {
   Buffer* buffer = DelegateAllocate(delegate_, requested, minimal,
                                     originator);
-  if (buffer != NULL) memset(buffer->data(), 0, buffer->size());
+  if (buffer != nullptr) memset(buffer->data(), 0, buffer->size());
   return buffer;
 }
 
@@ -207,7 +207,7 @@ bool ClearingBufferAllocator::ReallocateInternal(size_t requested,
                                                  size_t minimal,
                                                  Buffer* buffer,
                                                  BufferAllocator* originator) {
-  size_t offset = (buffer != NULL ? buffer->size() : 0);
+  size_t offset = (buffer != nullptr ? buffer->size() : 0);
   bool success = DelegateReallocate(delegate_, requested, minimal, buffer,
                                     originator);
   if (success && buffer->size() > offset) {
@@ -229,12 +229,12 @@ Buffer* MediatingBufferAllocator::AllocateInternal(
   size_t granted;
   if (requested > 0) {
     granted = mediator_->Allocate(requested, minimal);
-    if (granted < minimal) return NULL;
+    if (granted < minimal) return nullptr;
   } else {
     granted = 0;
   }
   Buffer* buffer = DelegateAllocate(delegate_, granted, minimal, originator);
-  if (buffer == NULL) {
+  if (buffer == nullptr) {
     mediator_->Free(granted);
   } else if (buffer->size() < granted) {
     mediator_->Free(granted - buffer->size());
@@ -276,7 +276,7 @@ Buffer* MemoryStatisticsCollectingBufferAllocator::AllocateInternal(
     const size_t minimal,
     BufferAllocator* const originator) {
   Buffer* buffer = DelegateAllocate(delegate_, requested, minimal, originator);
-  if (buffer != NULL) {
+  if (buffer != nullptr) {
     memory_stats_collector_->AllocatedMemoryBytes(buffer->size());
   } else {
     memory_stats_collector_->RefusedMemoryBytes(minimal);
@@ -330,7 +330,7 @@ Buffer* MemoryTrackingBufferAllocator::AllocateInternal(size_t requested,
                                                         BufferAllocator* originator) {
   if (TryConsume(requested)) {
     Buffer* buffer = DelegateAllocate(delegate_, requested, requested, originator);
-    if (buffer == NULL) {
+    if (buffer == nullptr) {
       mem_tracker_->Release(requested);
     } else {
       return buffer;
@@ -339,13 +339,13 @@ Buffer* MemoryTrackingBufferAllocator::AllocateInternal(size_t requested,
 
   if (TryConsume(minimal)) {
     Buffer* buffer = DelegateAllocate(delegate_, minimal, minimal, originator);
-    if (buffer == NULL) {
+    if (buffer == nullptr) {
       mem_tracker_->Release(minimal);
     }
     return buffer;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/metrics-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/metrics-test.cc b/src/kudu/util/metrics-test.cc
index dbdaf56..b038fd9 100644
--- a/src/kudu/util/metrics-test.cc
+++ b/src/kudu/util/metrics-test.cc
@@ -217,7 +217,7 @@ TEST_F(MetricsTest, RetirementTest) {
   // When we de-ref it, it should not get immediately retired, either, because
   // we keep retirable metrics around for some amount of time. We try retiring
   // a number of times to hit all the cases.
-  counter = NULL;
+  counter = nullptr;
   for (int i = 0; i < 3; i++) {
     entity_->RetireOldMetrics();
     ASSERT_EQ(1, entity_->UnsafeMetricsMapForTests().size());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/metrics.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/metrics.cc b/src/kudu/util/metrics.cc
index 08e5786..c3eba47 100644
--- a/src/kudu/util/metrics.cc
+++ b/src/kudu/util/metrics.cc
@@ -680,7 +680,7 @@ ScopedLatencyMetric::ScopedLatencyMetric(Histogram* latency_hist)
 }
 
 ScopedLatencyMetric::~ScopedLatencyMetric() {
-  if (latency_hist_ != NULL) {
+  if (latency_hist_ != nullptr) {
     MonoTime time_now = MonoTime::Now(MonoTime::FINE);
     latency_hist_->Increment(time_now.GetDeltaSince(time_started_).ToMicroseconds());
   }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/net/net_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/net_util-test.cc b/src/kudu/util/net/net_util-test.cc
index ea499f8..b1c33ef 100644
--- a/src/kudu/util/net/net_util-test.cc
+++ b/src/kudu/util/net/net_util-test.cc
@@ -89,7 +89,7 @@ TEST_F(NetUtilTest, TestResolveAddresses) {
     EXPECT_TRUE(addr.IsAnyLocalAddress());
   }
 
-  ASSERT_OK(hp.ResolveAddresses(NULL));
+  ASSERT_OK(hp.ResolveAddresses(nullptr));
 }
 
 // Ensure that we are able to do a reverse DNS lookup on various IP addresses.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/net/net_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/net_util.cc b/src/kudu/util/net/net_util.cc
index 94f4f33..2edd674 100644
--- a/src/kudu/util/net/net_util.cc
+++ b/src/kudu/util/net/net_util.cc
@@ -100,11 +100,11 @@ Status HostPort::ResolveAddresses(vector<Sockaddr>* addresses) const {
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = AF_INET;
   hints.ai_socktype = SOCK_STREAM;
-  struct addrinfo* res = NULL;
+  struct addrinfo* res = nullptr;
   int rc;
   LOG_SLOW_EXECUTION(WARNING, 200,
                      Substitute("resolving address for $0", host_)) {
-    rc = getaddrinfo(host_.c_str(), NULL, &hints, &res);
+    rc = getaddrinfo(host_.c_str(), nullptr, &hints, &res);
   }
   if (rc != 0) {
     return Status::NetworkError(
@@ -112,7 +112,7 @@ Status HostPort::ResolveAddresses(vector<Sockaddr>* addresses) const {
       gai_strerror(rc));
   }
   gscoped_ptr<addrinfo, AddrinfoDeleter> scoped_res(res);
-  for (; res != NULL; res = res->ai_next) {
+  for (; res != nullptr; res = res->ai_next) {
     CHECK_EQ(res->ai_family, AF_INET);
     struct sockaddr_in* addr = reinterpret_cast<struct sockaddr_in*>(res->ai_addr);
     addr->sin_port = htons(port_);
@@ -201,7 +201,7 @@ Status GetFQDN(string* hostname) {
   hints.ai_flags = AI_CANONNAME;
 
   struct addrinfo* result;
-  int rc = getaddrinfo(hostname->c_str(), NULL, &hints, &result);
+  int rc = getaddrinfo(hostname->c_str(), nullptr, &hints, &result);
   if (rc != 0) {
     return Status::NetworkError("Unable to lookup FQDN", ErrnoToString(errno), errno);
   }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/net/sockaddr.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/net/sockaddr.cc b/src/kudu/util/net/sockaddr.cc
index b826f07..3385e8c 100644
--- a/src/kudu/util/net/sockaddr.cc
+++ b/src/kudu/util/net/sockaddr.cc
@@ -119,7 +119,7 @@ Status Sockaddr::LookupHostname(string* hostname) const {
                      Substitute("DNS reverse-lookup for $0", ToString())) {
     rc = getnameinfo((struct sockaddr *) &addr_, sizeof(sockaddr_in),
                      host, NI_MAXHOST,
-                     NULL, 0, flags);
+                     nullptr, 0, flags);
   }
   if (PREDICT_FALSE(rc != 0)) {
     if (rc == EAI_SYSTEM) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/os-util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/os-util.cc b/src/kudu/util/os-util.cc
index 94d77e5..aac109c 100644
--- a/src/kudu/util/os-util.cc
+++ b/src/kudu/util/os-util.cc
@@ -63,7 +63,7 @@ static const int64_t IO_WAIT = 41 - 2;
 static const int64_t MAX_OFFSET = IO_WAIT;
 
 Status ParseStat(const std::string& buffer, std::string* name, ThreadStats* stats) {
-  DCHECK(stats != NULL);
+  DCHECK(stats != nullptr);
 
   // The thread name should be the only field with parentheses. But the name
   // itself may contain parentheses.
@@ -92,7 +92,7 @@ Status ParseStat(const std::string& buffer, std::string* name, ThreadStats* stat
   if (safe_strto64(splits[IO_WAIT], &tmp)) {
     stats->iowait_ns = tmp * (1e9 / TICKS_PER_SEC);
   }
-  if (name != NULL) {
+  if (name != nullptr) {
     *name = extracted_name;
   }
   return Status::OK();
@@ -100,7 +100,7 @@ Status ParseStat(const std::string& buffer, std::string* name, ThreadStats* stat
 }
 
 Status GetThreadStats(int64_t tid, ThreadStats* stats) {
-  DCHECK(stats != NULL);
+  DCHECK(stats != nullptr);
   if (TICKS_PER_SEC <= 0) {
     return Status::NotSupported("ThreadStats not supported");
   }
@@ -115,13 +115,13 @@ Status GetThreadStats(int64_t tid, ThreadStats* stats) {
   string buffer((istreambuf_iterator<char>(proc_file)),
       istreambuf_iterator<char>());
 
-  return ParseStat(buffer, NULL, stats); // don't want the name
+  return ParseStat(buffer, nullptr, stats); // don't want the name
 }
 
 bool RunShellProcess(const string& cmd, string* msg) {
-  DCHECK(msg != NULL);
+  DCHECK(msg != nullptr);
   FILE* fp = popen(cmd.c_str(), "r");
-  if (fp == NULL) {
+  if (fp == nullptr) {
     *msg = Substitute("Failed to execute shell cmd: '$0', error was: $1", cmd,
         ErrnoToString(errno));
     return false;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/pb_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/pb_util-test.cc b/src/kudu/util/pb_util-test.cc
index d97872c..3dc6e6f 100644
--- a/src/kudu/util/pb_util-test.cc
+++ b/src/kudu/util/pb_util-test.cc
@@ -314,7 +314,7 @@ TEST_F(TestPBUtil, TestInterleavedReadWrite) {
 
   // After closing the writer, the reader should be out of data.
   ASSERT_OK(pb_writer.Close());
-  ASSERT_TRUE(pb_reader.ReadNextPB(NULL).IsEndOfFile());
+  ASSERT_TRUE(pb_reader.ReadNextPB(nullptr).IsEndOfFile());
   ASSERT_OK(pb_reader.Close());
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/pb_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/pb_util.cc b/src/kudu/util/pb_util.cc
index f304582..0e89d64 100644
--- a/src/kudu/util/pb_util.cc
+++ b/src/kudu/util/pb_util.cc
@@ -233,7 +233,7 @@ void TruncateFields(Message* message, int max_len) {
         switch (field->cpp_type()) {
           case FieldDescriptor::CPPTYPE_STRING: {
             const string& s_const = reflection->GetRepeatedStringReference(*message, field, i,
-                                                                           NULL);
+                                                                           nullptr);
             TruncateString(const_cast<string*>(&s_const), max_len);
             break;
           }
@@ -248,7 +248,7 @@ void TruncateFields(Message* message, int max_len) {
     } else {
       switch (field->cpp_type()) {
         case FieldDescriptor::CPPTYPE_STRING: {
-          const string& s_const = reflection->GetStringReference(*message, field, NULL);
+          const string& s_const = reflection->GetStringReference(*message, field, nullptr);
           TruncateString(const_cast<string*>(&s_const), max_len);
           break;
         }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/util/pstack_watcher.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/pstack_watcher.cc b/src/kudu/util/pstack_watcher.cc
index e80464f..c7203dd 100644
--- a/src/kudu/util/pstack_watcher.cc
+++ b/src/kudu/util/pstack_watcher.cc
@@ -117,7 +117,7 @@ Status PstackWatcher::DumpPidStacks(pid_t pid, int flags) {
   }
 
   // Otherwise, try to use pstack or gstack.
-  const char *progname = NULL;
+  const char *progname = nullptr;
   if (HasProgram("pstack").ok()) {
     progname = "pstack";
   } else if (HasProgram("gstack").ok()) {



Mime
View raw message