kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [3/5] incubator-kudu git commit: Replace NULL with nullptr
Date Tue, 19 Jan 2016 22:48:13 GMT
http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/proxy.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/proxy.cc b/src/kudu/rpc/proxy.cc
index 4de345e..b5e94d6 100644
--- a/src/kudu/rpc/proxy.cc
+++ b/src/kudu/rpc/proxy.cc
@@ -51,7 +51,7 @@ Proxy::Proxy(const std::shared_ptr<Messenger>& messenger,
   : service_name_(service_name),
     messenger_(messenger),
     is_started_(false) {
-  CHECK(messenger != NULL);
+  CHECK(messenger != nullptr);
   DCHECK(!service_name_.empty()) << "Proxy service name must not be blank";
 
   // By default, we set the real user to the currently logged-in user.
@@ -75,7 +75,7 @@ void Proxy::AsyncRequest(const string& method,
                          google::protobuf::Message* response,
                          RpcController* controller,
                          const ResponseCallback& callback) const {
-  CHECK(controller->call_.get() == NULL) << "Controller should be reset";
+  CHECK(controller->call_.get() == nullptr) << "Controller should be reset";
   base::subtle::NoBarrier_Store(&is_started_, true);
   RemoteMethod remote_method(service_name_, method);
   OutboundCall* call = new OutboundCall(conn_id_, remote_method, response, controller, callback);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/reactor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.cc b/src/kudu/rpc/reactor.cc
index 8eeb76f..6ea8448 100644
--- a/src/kudu/rpc/reactor.cc
+++ b/src/kudu/rpc/reactor.cc
@@ -81,7 +81,7 @@ ReactorThread::ReactorThread(Reactor *reactor, const MessengerBuilder &bld)
 }
 
 Status ReactorThread::Init() {
-  DCHECK(thread_.get() == NULL) << "Already started";
+  DCHECK(thread_.get() == nullptr) << "Already started";
   DVLOG(6) << "Called ReactorThread::Init()";
   // Register to get async notifications in our epoll loop.
   async_.set(loop_);
@@ -450,11 +450,11 @@ DelayedTask::DelayedTask(const boost::function<void(const Status&)>& func,
                          MonoDelta when)
   : func_(func),
     when_(when),
-    thread_(NULL) {
+    thread_(nullptr) {
 }
 
 void DelayedTask::Run(ReactorThread* thread) {
-  DCHECK(thread_ == NULL) << "Task has already been scheduled";
+  DCHECK(thread_ == nullptr) << "Task has already been scheduled";
   DCHECK(thread->IsCurrentThread());
 
   // Schedule the task to run later.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/rpc_controller.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_controller.cc b/src/kudu/rpc/rpc_controller.cc
index be03d82..672ac12 100644
--- a/src/kudu/rpc/rpc_controller.cc
+++ b/src/kudu/rpc/rpc_controller.cc
@@ -56,7 +56,7 @@ const ErrorStatusPB* RpcController::error_response() const {
   if (call_) {
     return call_->error_pb();
   }
-  return NULL;
+  return nullptr;
 }
 
 Status RpcController::GetSidecar(int idx, Slice* sidecar) const {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/sasl_client.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_client.cc b/src/kudu/rpc/sasl_client.cc
index 0956356..c68351f 100644
--- a/src/kudu/rpc/sasl_client.cc
+++ b/src/kudu/rpc/sasl_client.cc
@@ -94,7 +94,7 @@ SaslClient::SaslClient(const string& app_name, int fd)
       reinterpret_cast<int (*)()>(&SaslClientSimpleCb), this));
   callbacks_.push_back(SaslBuildCallback(SASL_CB_PASS,
       reinterpret_cast<int (*)()>(&SaslClientSecretCb), this));
-  callbacks_.push_back(SaslBuildCallback(SASL_CB_LIST_END, NULL, NULL));
+  callbacks_.push_back(SaslBuildCallback(SASL_CB_LIST_END, nullptr, nullptr));
 }
 
 SaslClient::~SaslClient() {
@@ -151,7 +151,7 @@ Status SaslClient::Init(const string& service_type) {
   // TODO: Support security flags.
   unsigned secflags = 0;
 
-  sasl_conn_t* sasl_conn = NULL;
+  sasl_conn_t* sasl_conn = nullptr;
   int result = sasl_client_new(
       service_type.c_str(),         // Registered name of the service using SASL. Required.
       helper_.server_fqdn(),        // The fully qualified domain name of the remote server.
@@ -287,7 +287,7 @@ Status SaslClient::SendResponseMessage(const char* resp_msg, unsigned resp_msg_l
 
 Status SaslClient::DoSaslStep(const string& in, const char** out, unsigned* out_len, int* result) {
   TRACE("SASL Client: Calling sasl_client_step()");
-  int res = sasl_client_step(sasl_conn_.get(), in.c_str(), in.length(), NULL, out, out_len);
+  int res = sasl_client_step(sasl_conn_.get(), in.c_str(), in.length(), nullptr, out, out_len);
   *result = res;
   if (res == SASL_OK) {
     nego_ok_ = true;
@@ -313,9 +313,9 @@ Status SaslClient::HandleNegotiateResponse(const SaslMessagePB& response) {
   }
   TRACE("SASL Client: Server mech list: $0", mech_list);
 
-  const char* init_msg = NULL;
+  const char* init_msg = nullptr;
   unsigned init_msg_len = 0;
-  const char* negotiated_mech = NULL;
+  const char* negotiated_mech = nullptr;
 
   /* select a mechanism for a connection
    *  mechlist      -- mechanisms server has available (punctuation ignored)
@@ -335,7 +335,7 @@ Status SaslClient::HandleNegotiateResponse(const SaslMessagePB& response) {
   int result = sasl_client_start(
       sasl_conn_.get(),     // The SASL connection context created by init()
       mech_list.c_str(),    // The list of mechanisms from the server.
-      NULL,                 // Disables INTERACT return if NULL.
+      nullptr,              // Disables INTERACT return if NULL.
       &init_msg,            // Filled in on success.
       &init_msg_len,        // Filled in on success.
       &negotiated_mech);    // Filled in on success.
@@ -349,7 +349,7 @@ Status SaslClient::HandleNegotiateResponse(const SaslMessagePB& response) {
 
   // The server matched one of our mechanisms.
   SaslMessagePB::SaslAuth* auth = FindOrNull(mech_auth_map, negotiated_mech);
-  if (PREDICT_FALSE(auth == NULL)) {
+  if (PREDICT_FALSE(auth == nullptr)) {
     return Status::IllegalState("Unable to find auth in map, unexpected error", negotiated_mech);
   }
   negotiated_mech_ = SaslMechanism::value_of(negotiated_mech);
@@ -376,7 +376,7 @@ Status SaslClient::HandleChallengeResponse(const SaslMessagePB& response) {
     return Status::InvalidArgument("No token in CHALLENGE response from server");
   }
 
-  const char* out = NULL;
+  const char* out = nullptr;
   unsigned out_len = 0;
   int result = 0;
   RETURN_NOT_OK(DoSaslStep(response.token(), &out, &out_len, &result));
@@ -388,7 +388,7 @@ Status SaslClient::HandleChallengeResponse(const SaslMessagePB& response) {
 Status SaslClient::HandleSuccessResponse(const SaslMessagePB& response) {
   TRACE("SASL Client: Received SUCCESS response from server");
   if (!nego_ok_) {
-    const char* out = NULL;
+    const char* out = nullptr;
     unsigned out_len = 0;
     int result = 0;
     RETURN_NOT_OK(DoSaslStep(response.token(), &out, &out_len, &result));
@@ -425,7 +425,7 @@ int SaslClient::GetOptionCb(const char* plugin_name, const char* option,
 // Used for PLAIN and ANONYMOUS.
 // SASL callback for SASL_CB_USER, SASL_CB_AUTHNAME, SASL_CB_LANGUAGE
 int SaslClient::SimpleCb(int id, const char** result, unsigned* len) {
-  if (PREDICT_FALSE(result == NULL)) {
+  if (PREDICT_FALSE(result == nullptr)) {
     LOG(DFATAL) << "SASL Client: result outparam is NULL";
     return SASL_BADPARAM;
   }
@@ -436,16 +436,16 @@ int SaslClient::SimpleCb(int id, const char** result, unsigned* len) {
       TRACE("SASL Client: callback for SASL_CB_USER");
       if (helper_.IsPlainEnabled()) {
         *result = plain_auth_user_.c_str();
-        if (len != NULL) *len = plain_auth_user_.length();
+        if (len != nullptr) *len = plain_auth_user_.length();
       } else if (helper_.IsAnonymousEnabled()) {
-        *result = NULL;
+        *result = nullptr;
       }
       break;
     case SASL_CB_AUTHNAME:
       TRACE("SASL Client: callback for SASL_CB_AUTHNAME");
       if (helper_.IsPlainEnabled()) {
         *result = plain_auth_user_.c_str();
-        if (len != NULL) *len = plain_auth_user_.length();
+        if (len != nullptr) *len = plain_auth_user_.length();
       }
       break;
     case SASL_CB_LANGUAGE:

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/sasl_common.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_common.cc b/src/kudu/rpc/sasl_common.cc
index 2b7500a..b2c7849 100644
--- a/src/kudu/rpc/sasl_common.cc
+++ b/src/kudu/rpc/sasl_common.cc
@@ -44,7 +44,7 @@ const char* const kSaslMechPlain = "PLAIN";
 // message: message to output;
 static int SaslLogCallback(void* context, int level, const char* message) {
 
-  if (message == NULL) return SASL_BADPARAM;
+  if (message == nullptr) return SASL_BADPARAM;
 
   switch (level) {
     case SASL_LOG_NONE:
@@ -87,7 +87,7 @@ static int SaslLogCallback(void* context, int level, const char* message) {
 static int SaslGetOption(void* context, const char* plugin_name, const char* option,
                          const char** result, unsigned* len) {
   // Handle Sasl Library options
-  if (plugin_name == NULL) {
+  if (plugin_name == nullptr) {
     // Return the logging level that we want the sasl library to use.
     if (strcmp("log_level", option) == 0) {
       int level = SASL_LOG_NOTE;
@@ -102,7 +102,7 @@ static int SaslGetOption(void* context, const char* plugin_name, const char* opt
       static __thread char buf[4];
       snprintf(buf, arraysize(buf), "%d", level);
       *result = buf;
-      if (len != NULL) *len = strlen(buf);
+      if (len != nullptr) *len = strlen(buf);
       return SASL_OK;
     }
     // Options can default so don't complain.
@@ -115,9 +115,9 @@ static int SaslGetOption(void* context, const char* plugin_name, const char* opt
 
 // Array of callbacks for the sasl library.
 static sasl_callback_t callbacks[] = {
-  { SASL_CB_LOG, reinterpret_cast<int (*)()>(&SaslLogCallback), NULL },
-  { SASL_CB_GETOPT, reinterpret_cast<int (*)()>(&SaslGetOption), NULL },
-  { SASL_CB_LIST_END, NULL, NULL }
+  { SASL_CB_LOG, reinterpret_cast<int (*)()>(&SaslLogCallback), nullptr },
+  { SASL_CB_GETOPT, reinterpret_cast<int (*)()>(&SaslGetOption), nullptr },
+  { SASL_CB_LIST_END, nullptr, nullptr }
 };
 
 // Determine whether initialization was ever called
@@ -141,14 +141,14 @@ static void DoSaslInit(void* app_name_char_array) {
   int result = sasl_client_init(&callbacks[0]);
   if (result != SASL_OK) {
     sasl_init_data->status = Status::RuntimeError("Could not initialize SASL client",
-        sasl_errstring(result, NULL, NULL));
+        sasl_errstring(result, nullptr, nullptr));
     return;
   }
 
   result = sasl_server_init(&callbacks[0], sasl_init_data->app_name.c_str());
   if (result != SASL_OK) {
     sasl_init_data->status = Status::RuntimeError("Could not initialize SASL server",
-        sasl_errstring(result, NULL, NULL));
+        sasl_errstring(result, nullptr, nullptr));
     return;
   }
 
@@ -171,12 +171,12 @@ Status SaslInit(const char* const app_name) {
 }
 
 string SaslErrDesc(int status, sasl_conn_t* conn) {
-  if (conn != NULL) {
+  if (conn != nullptr) {
     return StringPrintf("SASL result code: %s, error: %s",
-        sasl_errstring(status, NULL, NULL),
+        sasl_errstring(status, nullptr, nullptr),
         sasl_errdetail(conn));
   }
-  return StringPrintf("SASL result code: %s", sasl_errstring(status, NULL, NULL));
+  return StringPrintf("SASL result code: %s", sasl_errstring(status, nullptr, nullptr));
 }
 
 string SaslIpPortString(const Sockaddr& addr) {
@@ -193,7 +193,7 @@ set<string> SaslListAvailableMechs() {
 
   // Array of NULL-terminated strings. Array terminated with NULL.
   const char** mech_strings = sasl_global_listmech();
-  while (mech_strings != NULL && *mech_strings != NULL) {
+  while (mech_strings != nullptr && *mech_strings != nullptr) {
     mechs.insert(*mech_strings);
     mech_strings++;
   }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/sasl_helper.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_helper.cc b/src/kudu/rpc/sasl_helper.cc
index 7ea2b97..79d46e9 100644
--- a/src/kudu/rpc/sasl_helper.cc
+++ b/src/kudu/rpc/sasl_helper.cc
@@ -58,21 +58,21 @@ void SaslHelper::set_local_addr(const Sockaddr& addr) {
   local_addr_ = SaslIpPortString(addr);
 }
 const char* SaslHelper::local_addr_string() const {
-  return local_addr_.empty() ? NULL : local_addr_.c_str();
+  return local_addr_.empty() ? nullptr : local_addr_.c_str();
 }
 
 void SaslHelper::set_remote_addr(const Sockaddr& addr) {
   remote_addr_ = SaslIpPortString(addr);
 }
 const char* SaslHelper::remote_addr_string() const {
-  return remote_addr_.empty() ? NULL : remote_addr_.c_str();
+  return remote_addr_.empty() ? nullptr : remote_addr_.c_str();
 }
 
 void SaslHelper::set_server_fqdn(const string& domain_name) {
   server_fqdn_ = domain_name;
 }
 const char* SaslHelper::server_fqdn() const {
-  return server_fqdn_.empty() ? NULL : server_fqdn_.c_str();
+  return server_fqdn_.empty() ? nullptr : server_fqdn_.c_str();
 }
 
 const std::set<std::string>& SaslHelper::GlobalMechs() const {
@@ -92,7 +92,7 @@ const std::set<std::string>& SaslHelper::LocalMechs() const {
 
 const char* SaslHelper::LocalMechListString() const {
   JoinStrings(mechs_, " ", &mech_list_);
-  return mech_list_.empty() ? NULL : mech_list_.c_str();
+  return mech_list_.empty() ? nullptr : mech_list_.c_str();
 }
 
 
@@ -107,16 +107,16 @@ int SaslHelper::GetOptionCb(const char* plugin_name, const char* option,
   DVLOG(4) << tag_ << ": GetOption Plugin name: " << plugin_name;
   DVLOG(4) << tag_ << ": GetOption Option name: " << option;
 
-  if (PREDICT_FALSE(result == NULL)) {
+  if (PREDICT_FALSE(result == nullptr)) {
     LOG(DFATAL) << tag_ << ": SASL Library passed NULL result out-param to GetOption callback!";
     return SASL_BADPARAM;
   }
 
-  if (plugin_name == NULL) {
+  if (plugin_name == nullptr) {
     // SASL library option, not a plugin option
     if (cb_name == option) {
       *result = LocalMechListString();
-      if (len != NULL) *len = strlen(*result);
+      if (len != nullptr) *len = strlen(*result);
       DVLOG(3) << tag_ << ": Enabled mech list: " << *result;
       return SASL_OK;
     }
@@ -175,7 +175,7 @@ Status SaslHelper::ParseSaslMessage(const Slice& param_buf, SaslMessagePB* msg)
 
 Status SaslHelper::SendSaslMessage(Socket* sock, const MessageLite& header, const MessageLite& msg,
       const MonoTime& deadline) {
-  DCHECK(sock != NULL);
+  DCHECK(sock != nullptr);
   DCHECK(header.IsInitialized()) << tag_ << ": Header must be initialized";
   DCHECK(msg.IsInitialized()) << tag_ << ": Message must be initialized";
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/sasl_server.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_server.cc b/src/kudu/rpc/sasl_server.cc
index 0ceaa58..b2b4ac8 100644
--- a/src/kudu/rpc/sasl_server.cc
+++ b/src/kudu/rpc/sasl_server.cc
@@ -63,7 +63,7 @@ SaslServer::SaslServer(const string& app_name, int fd)
       reinterpret_cast<int (*)()>(&SaslServerGetoptCb), this));
   callbacks_.push_back(SaslBuildCallback(SASL_CB_SERVER_USERDB_CHECKPASS,
       reinterpret_cast<int (*)()>(&SaslServerPlainAuthCb), this));
-  callbacks_.push_back(SaslBuildCallback(SASL_CB_LIST_END, NULL, NULL));
+  callbacks_.push_back(SaslBuildCallback(SASL_CB_LIST_END, nullptr, nullptr));
 }
 
 SaslServer::~SaslServer() {
@@ -125,11 +125,11 @@ Status SaslServer::Init(const string& service_type) {
   // TODO: Support security flags.
   unsigned secflags = 0;
 
-  sasl_conn_t* sasl_conn = NULL;
+  sasl_conn_t* sasl_conn = nullptr;
   int result = sasl_server_new(
       service_type.c_str(),         // Registered name of the service using SASL. Required.
       helper_.server_fqdn(),        // The fully qualified domain name of this server.
-      NULL,                         // Permits multiple user realms on server. NULL == use default.
+      nullptr,                      // Permits multiple user realms on server. NULL == use default.
       helper_.local_addr_string(),  // Local and remote IP address strings. (NULL disables
       helper_.remote_addr_string(), //   mechanisms which require this info.)
       &callbacks_[0],               // Connection-specific callbacks.
@@ -326,7 +326,7 @@ Status SaslServer::HandleInitiateRequest(const SaslMessagePB& request) {
   // Security issue to display this. Commented out but left for debugging purposes.
   //DVLOG(3) << "SASL server: Client token: " << request.token();
 
-  const char* server_out = NULL;
+  const char* server_out = nullptr;
   uint32_t server_out_len = 0;
   TRACE("SASL Server: Calling sasl_server_start()");
   int result = sasl_server_start(
@@ -391,7 +391,7 @@ Status SaslServer::HandleResponseRequest(const SaslMessagePB& request) {
     return s;
   }
 
-  const char* server_out = NULL;
+  const char* server_out = nullptr;
   uint32_t server_out_len = 0;
   TRACE("SASL Server: Calling sasl_server_step()");
   int result = sasl_server_step(

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/rpc/service_if.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/service_if.cc b/src/kudu/rpc/service_if.cc
index 2b52351..7377cea 100644
--- a/src/kudu/rpc/service_if.cc
+++ b/src/kudu/rpc/service_if.cc
@@ -32,7 +32,7 @@ namespace kudu {
 namespace rpc {
 
 RpcMethodMetrics::RpcMethodMetrics()
-  : handler_latency(NULL) {
+  : handler_latency(nullptr) {
 }
 
 RpcMethodMetrics::~RpcMethodMetrics() {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/server/default-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/default-path-handlers.cc b/src/kudu/server/default-path-handlers.cc
index 15f7677..6053f4d 100644
--- a/src/kudu/server/default-path-handlers.cc
+++ b/src/kudu/server/default-path-handlers.cc
@@ -157,7 +157,7 @@ static void MemTrackersHandler(const Webserver::WebRequest& req, std::stringstre
   vector<shared_ptr<MemTracker> > trackers;
   MemTracker::ListTrackers(&trackers);
   for (const shared_ptr<MemTracker>& tracker : trackers) {
-    string parent = tracker->parent() == NULL ? "none" : tracker->parent()->id();
+    string parent = tracker->parent() == nullptr ? "none" : tracker->parent()->id();
     string limit_str = tracker->limit() == -1 ? "none" :
                        HumanReadableNumBytes::ToString(tracker->limit());
     string current_consumption_str = HumanReadableNumBytes::ToString(tracker->consumption());
@@ -203,7 +203,7 @@ static void WriteMetricsAsJson(const MetricRegistry* const metrics,
 
   JsonWriter writer(output, json_mode);
 
-  if (requested_metrics_param != NULL) {
+  if (requested_metrics_param != nullptr) {
     SplitStringUsing(*requested_metrics_param, ",", &requested_metrics);
   } else {
     // Default to including all metrics.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/server/webserver.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/webserver.cc b/src/kudu/server/webserver.cc
index d19a889..04c1456 100644
--- a/src/kudu/server/webserver.cc
+++ b/src/kudu/server/webserver.cc
@@ -75,7 +75,7 @@ namespace kudu {
 
 Webserver::Webserver(const WebserverOptions& opts)
   : opts_(opts),
-    context_(NULL) {
+    context_(nullptr) {
   string host = opts.bind_interface.empty() ? "0.0.0.0" : opts.bind_interface;
   http_address_ = host + ":" + boost::lexical_cast<string>(opts.port);
 }
@@ -181,7 +181,7 @@ Status Webserver::Start() {
   options.push_back(num_threads_str.c_str());
 
   // Options must be a NULL-terminated list
-  options.push_back(NULL);
+  options.push_back(nullptr);
 
   // mongoose ignores SIGCHLD and we need it to run kinit. This means that since
   // mongoose does not reap its own children CGI programs must be avoided.
@@ -202,7 +202,7 @@ Status Webserver::Start() {
   // Restore the child signal handler so wait() works properly.
   signal(SIGCHLD, sig_chld);
 
-  if (context_ == NULL) {
+  if (context_ == nullptr) {
     stringstream error_msg;
     error_msg << "Webserver: Could not start on address " << http_address_;
     Sockaddr addr;
@@ -231,9 +231,9 @@ Status Webserver::Start() {
 }
 
 void Webserver::Stop() {
-  if (context_ != NULL) {
+  if (context_ != nullptr) {
     sq_stop(context_);
-    context_ = NULL;
+    context_ = nullptr;
   }
 }
 
@@ -262,7 +262,7 @@ Status Webserver::GetBoundAddresses(std::vector<Sockaddr>* addrs) const {
 
 int Webserver::LogMessageCallbackStatic(const struct sq_connection* connection,
                                         const char* message) {
-  if (message != NULL) {
+  if (message != nullptr) {
     LOG(INFO) << "Webserver: " << message;
     return 1;
   }
@@ -308,7 +308,7 @@ int Webserver::RunPathHandler(const PathHandler& handler,
   bool use_style = true;
 
   WebRequest req;
-  if (request_info->query_string != NULL) {
+  if (request_info->query_string != nullptr) {
     req.query_string = request_info->query_string;
     BuildArgumentMap(request_info->query_string, &req.parsed_args);
   }
@@ -316,7 +316,7 @@ int Webserver::RunPathHandler(const PathHandler& handler,
   if (req.request_method == "POST") {
     const char* content_len_str = sq_get_header(connection, "Content-Length");
     int32_t content_len = 0;
-    if (content_len_str == NULL ||
+    if (content_len_str == nullptr ||
         !safe_strto32(content_len_str, &content_len)) {
       sq_printf(connection, "HTTP/1.1 411 Length Required\r\n");
       return 1;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/cbtree-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cbtree-test.cc b/src/kudu/tablet/cbtree-test.cc
index d9402cd..44d9610 100644
--- a/src/kudu/tablet/cbtree-test.cc
+++ b/src/kudu/tablet/cbtree-test.cc
@@ -241,7 +241,7 @@ void InsertAndVerify(boost::barrier *go_barrier,
   while (true) {
     go_barrier->wait();
 
-    if (tree->get() == NULL) return;
+    if (tree->get() == nullptr) return;
 
     InsertRange(tree->get(), start_idx, end_idx);
     VerifyRange(*tree->get(), start_idx, end_idx);
@@ -443,7 +443,7 @@ TEST_F(TestCBTree, TestConcurrentInsert) {
     }
   }
 
-  tree.reset(NULL);
+  tree.reset(nullptr);
   go_barrier.wait();
 
   for (boost::thread &thr : threads) {
@@ -623,7 +623,7 @@ static void ScanThread(boost::barrier *go_barrier,
                        gscoped_ptr<CBTree<T> > *tree) {
   while (true) {
     go_barrier->wait();
-    if (tree->get() == NULL) return;
+    if (tree->get() == nullptr) return;
 
     int prev_count = 0;
     int count = 0;
@@ -710,7 +710,7 @@ TEST_F(TestCBTree, TestConcurrentIterateAndInsert) {
     }
   }
 
-  tree.reset(NULL);
+  tree.reset(nullptr);
   go_barrier.wait();
 
   for (boost::thread &thr : threads) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/cfile_set-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set-test.cc b/src/kudu/tablet/cfile_set-test.cc
index 52df47d..fc62d30 100644
--- a/src/kudu/tablet/cfile_set-test.cc
+++ b/src/kudu/tablet/cfile_set-test.cc
@@ -36,7 +36,7 @@ class TestCFileSet : public KuduRowSetTest {
  public:
   TestCFileSet() :
     KuduRowSetTest(Schema({ ColumnSchema("c0", UINT32),
-                            ColumnSchema("c1", UINT32, false, NULL, NULL, GetRLEStorage()),
+                            ColumnSchema("c1", UINT32, false, nullptr, nullptr, GetRLEStorage()),
                             ColumnSchema("c2", UINT32) }, 1))
   {}
 
@@ -82,8 +82,8 @@ class TestCFileSet : public KuduRowSetTest {
     ScanSpec spec;
     ColumnRangePredicate pred1(
       schema_.column(0),
-      lower != kNoBound ? &lower : NULL,
-      upper != kNoBound ? &upper : NULL);
+      lower != kNoBound ? &lower : nullptr,
+      upper != kNoBound ? &upper : nullptr);
     spec.AddPredicate(pred1);
     ASSERT_OK(iter->Init(&spec));
 
@@ -128,7 +128,7 @@ TEST_F(TestCFileSet, TestPartiallyMaterialize) {
   ASSERT_OK(fileset->Open());
 
   gscoped_ptr<CFileSet::Iterator> iter(fileset->NewIterator(&schema_));
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
 
   Arena arena(4096, 1024*1024);
   RowBlock block(schema_, 100, &arena);
@@ -212,7 +212,7 @@ TEST_F(TestCFileSet, TestIteratePartialSchema) {
   shared_ptr<CFileSet::Iterator> cfile_iter(fileset->NewIterator(&new_schema));
   gscoped_ptr<RowwiseIterator> iter(new MaterializingIterator(cfile_iter));
 
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
 
   // Read all the results.
   vector<string> results;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/cfile_set.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set.cc b/src/kudu/tablet/cfile_set.cc
index 91dffc0..d5a5e07 100644
--- a/src/kudu/tablet/cfile_set.cc
+++ b/src/kudu/tablet/cfile_set.cc
@@ -105,7 +105,7 @@ Status CFileSet::Open() {
 }
 
 Status CFileSet::OpenAdHocIndexReader() {
-  if (ad_hoc_idx_reader_ != NULL) {
+  if (ad_hoc_idx_reader_ != nullptr) {
     return Status::OK();
   }
 
@@ -119,7 +119,7 @@ Status CFileSet::OpenAdHocIndexReader() {
 
 
 Status CFileSet::OpenBloomReader() {
-  if (bloom_reader_ != NULL) {
+  if (bloom_reader_ != nullptr) {
     return Status::OK();
   }
 
@@ -198,7 +198,7 @@ uint64_t CFileSet::EstimateOnDiskSize() const {
 
 Status CFileSet::FindRow(const RowSetKeyProbe &probe, rowid_t *idx,
                          ProbeStats* stats) const {
-  if (bloom_reader_ != NULL && FLAGS_consult_bloom_filters) {
+  if (bloom_reader_ != nullptr && FLAGS_consult_bloom_filters) {
     // Fully open the BloomFileReader if it was lazily opened earlier.
     //
     // If it's already initialized, this is a no-op.
@@ -212,13 +212,13 @@ Status CFileSet::FindRow(const RowSetKeyProbe &probe, rowid_t *idx,
     } else if (!s.ok()) {
       LOG(WARNING) << "Unable to query bloom: " << s.ToString()
                    << " (disabling bloom for this rowset from this point forward)";
-      const_cast<CFileSet *>(this)->bloom_reader_.reset(NULL);
+      const_cast<CFileSet *>(this)->bloom_reader_.reset(nullptr);
       // Continue with the slow path
     }
   }
 
   stats->keys_consulted++;
-  CFileIterator *key_iter = NULL;
+  CFileIterator *key_iter = nullptr;
   RETURN_NOT_OK(NewKeyIterator(&key_iter));
 
   gscoped_ptr<CFileIterator> key_iter_scoped(key_iter); // free on return
@@ -329,7 +329,7 @@ Status CFileSet::Iterator::PushdownRangeScanPredicate(ScanSpec *spec) {
   lower_bound_idx_ = 0;
   upper_bound_idx_ = row_count_;
 
-  if (spec == NULL) {
+  if (spec == nullptr) {
     // No predicate.
     return Status::OK();
   }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction-test.cc b/src/kudu/tablet/compaction-test.cc
index 384c798..3383866 100644
--- a/src/kudu/tablet/compaction-test.cc
+++ b/src/kudu/tablet/compaction-test.cc
@@ -111,7 +111,7 @@ class TestCompaction : public KuduRowSetTest {
       ContiguousRow dst_row(&mrs->schema(), rowbuf);
       ASSERT_OK_FAST(projector.Init());
       ASSERT_OK_FAST(projector.ProjectRowForWrite(row_builder_.row(),
-                            &dst_row, static_cast<Arena*>(NULL)));
+                            &dst_row, static_cast<Arena*>(nullptr)));
       ASSERT_OK_FAST(mrs->Insert(tx.timestamp(), ConstContiguousRow(dst_row), op_id_));
     } else {
       ASSERT_OK_FAST(mrs->Insert(tx.timestamp(), row_builder_.row(), op_id_));
@@ -141,7 +141,7 @@ class TestCompaction : public KuduRowSetTest {
       update.AddColumnUpdate(schema_.column_by_id(col_id), col_id, &new_val);
       if (new_val % 2 == 0) {
         update.AddColumnUpdate(schema_.column_by_id(nullable_col_id),
-                               nullable_col_id, NULL);
+                               nullable_col_id, nullptr);
       } else {
         update.AddColumnUpdate(schema_.column_by_id(nullable_col_id),
                                nullable_col_id, &new_val);
@@ -620,7 +620,7 @@ TEST_F(TestCompaction, TestOneToOne) {
   MvccSnapshot snap3(mvcc_);
   gscoped_ptr<CompactionInput> compact_input;
   ASSERT_OK(CompactionInput::Create(*rs, &schema_, snap3, &compact_input));
-  DoFlushAndReopen(compact_input.get(), schema_, snap3, kLargeRollThreshold, NULL);
+  DoFlushAndReopen(compact_input.get(), schema_, snap3, kLargeRollThreshold, nullptr);
 }
 
 // Test merging two row sets and the second one has updates, KUDU-102

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction.cc b/src/kudu/tablet/compaction.cc
index c452f8a..1ec9892 100644
--- a/src/kudu/tablet/compaction.cc
+++ b/src/kudu/tablet/compaction.cc
@@ -75,7 +75,7 @@ class MemRowSetCompactionInput : public CompactionInput {
     // Realloc the internal block storage if we don't have enough space to
     // copy the whole leaf node's worth of data into it.
     if (PREDICT_FALSE(!row_block_ || num_in_block > row_block_->nrows())) {
-      row_block_.reset(new RowBlock(iter_->schema(), num_in_block, NULL));
+      row_block_.reset(new RowBlock(iter_->schema(), num_in_block, nullptr));
     }
 
     arena_.Reset();
@@ -473,13 +473,13 @@ class MergeCompactionInput : public CompactionInput {
   // Returns -1 if latest_version(left) < latest_version(right)
   static int CompareLatestLiveVersion(const CompactionInputRow& left,
                                       const CompactionInputRow& right) {
-    if (left.redo_head == NULL) {
+    if (left.redo_head == nullptr) {
       // left must still be alive
-      DCHECK(right.redo_head != NULL);
+      DCHECK(right.redo_head != nullptr);
       return 1;
     }
-    if (right.redo_head == NULL) {
-      DCHECK(left.redo_head != NULL);
+    if (right.redo_head == nullptr) {
+      DCHECK(left.redo_head != nullptr);
       return -1;
     }
 
@@ -506,7 +506,7 @@ class MergeCompactionInput : public CompactionInput {
   }
 
   static void AdvanceToLastInList(const Mutation** m) {
-    while ((*m)->next() != NULL) {
+    while ((*m)->next() != nullptr) {
       *m = (*m)->next();
     }
   }
@@ -632,10 +632,10 @@ Status ApplyMutationsAndGenerateUndos(const MvccSnapshot& snap,
   // which doesn't actually mutate it and having Mutation::set_next()
   // take a non-const value is required in other places.
   Mutation* undo_head = const_cast<Mutation*>(src_row.undo_head);
-  Mutation* redo_head = NULL;
+  Mutation* redo_head = nullptr;
 
   for (const Mutation *redo_mut = src_row.redo_head;
-       redo_mut != NULL;
+       redo_mut != nullptr;
        redo_mut = redo_mut->next()) {
 
     // Skip anything not committed.
@@ -679,7 +679,7 @@ Status ApplyMutationsAndGenerateUndos(const MvccSnapshot& snap,
 
       // In the case where the previous undo was NULL just make this one
       // the head.
-      if (undo_head == NULL) {
+      if (undo_head == nullptr) {
         undo_head = current_undo;
       } else {
         current_undo->set_next(undo_head);
@@ -699,7 +699,7 @@ Status ApplyMutationsAndGenerateUndos(const MvccSnapshot& snap,
         RETURN_NOT_OK(redo_decoder.GetReinsertedRowSlice(*dst_schema, &reinserted_slice));
         ConstContiguousRow reinserted(dst_schema, reinserted_slice.data());
         // No need to copy into an arena -- can refer to the mutation's arena.
-        Arena* null_arena = NULL;
+        Arena* null_arena = nullptr;
         RETURN_NOT_OK(CopyRow(reinserted, dst_row, null_arena));
 
         // Create an undo for the REINSERT
@@ -711,7 +711,7 @@ Status ApplyMutationsAndGenerateUndos(const MvccSnapshot& snap,
 
         // Also reset the previous redo head since it stored the delete which was nullified
         // by this reinsert
-        redo_head = NULL;
+        redo_head = nullptr;
 
         if ((*num_rows_history_truncated)++ == 0) {
           LOG(WARNING) << "Found REINSERT REDO truncating row history for "
@@ -752,7 +752,7 @@ Status FlushCompactionInput(CompactionInput* input,
 
   DCHECK(out->schema().has_column_ids());
 
-  RowBlock block(out->schema(), 100, NULL);
+  RowBlock block(out->schema(), 100, nullptr);
 
   uint64_t num_rows_history_truncated = 0;
 
@@ -776,8 +776,8 @@ Status FlushCompactionInput(CompactionInput* input,
         " Redo Mutations: " << Mutation::StringifyMutationList(*schema, input_row.redo_head);
 
       // Collect the new UNDO/REDO mutations.
-      Mutation* new_undos_head = NULL;
-      Mutation* new_redos_head = NULL;
+      Mutation* new_undos_head = nullptr;
+      Mutation* new_redos_head = nullptr;
 
       bool is_garbage_collected;
       RETURN_NOT_OK(ApplyMutationsAndGenerateUndos(snap,
@@ -801,7 +801,7 @@ Status FlushCompactionInput(CompactionInput* input,
 
       // We should always have UNDO deltas, until we implement delta GC. For now,
       // this is a convenient assertion to catch bugs like KUDU-632.
-      CHECK(new_undos_head != NULL) <<
+      CHECK(new_undos_head != nullptr) <<
         "Writing an output row with no UNDOs: "
         "Input Row: " << dst_row.schema()->DebugRow(dst_row) <<
         " RowId: " << input_row.row.row_index() <<
@@ -809,7 +809,7 @@ Status FlushCompactionInput(CompactionInput* input,
         " Redo Mutations: " << Mutation::StringifyMutationList(*schema, input_row.redo_head);
       out->AppendUndoDeltas(dst_row.row_index(), new_undos_head, &index_in_current_drs_);
 
-      if (new_redos_head != NULL) {
+      if (new_redos_head != nullptr) {
         out->AppendRedoDeltas(dst_row.row_index(), new_redos_head, &index_in_current_drs_);
       }
 
@@ -889,7 +889,7 @@ Status ReupdateMissedDeltas(const string &tablet_name,
           " Undo Mutations: " << Mutation::StringifyMutationList(*schema, row.undo_head);
 
       for (const Mutation *mut = row.redo_head;
-           mut != NULL;
+           mut != nullptr;
            mut = mut->next()) {
         RowChangeListDecoder decoder(mut->changelist());
         RETURN_NOT_OK(decoder.Init());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/compaction_policy-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction_policy-test.cc b/src/kudu/tablet/compaction_policy-test.cc
index 1d8075c..6a72cf7 100644
--- a/src/kudu/tablet/compaction_policy-test.cc
+++ b/src/kudu/tablet/compaction_policy-test.cc
@@ -47,7 +47,7 @@ TEST(TestCompactionPolicy, TestBudgetedSelection) {
 
   unordered_set<RowSet*> picked;
   double quality = 0;
-  ASSERT_OK(policy.PickRowSets(tree, &picked, &quality, NULL));
+  ASSERT_OK(policy.PickRowSets(tree, &picked, &quality, nullptr));
   ASSERT_EQ(3, picked.size());
   ASSERT_GE(quality, 1.0);
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/compaction_policy.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction_policy.cc b/src/kudu/tablet/compaction_policy.cc
index 1809e47..c1d642e 100644
--- a/src/kudu/tablet/compaction_policy.cc
+++ b/src/kudu/tablet/compaction_policy.cc
@@ -318,7 +318,7 @@ Status BudgetedCompactionPolicy::PickRowSets(const RowSetTree &tree,
   }
 
   // Log the input and output of the selection.
-  if (VLOG_IS_ON(1) || log != NULL) {
+  if (VLOG_IS_ON(1) || log != nullptr) {
     LOG_STRING(INFO, log) << "Budgeted compaction selection:";
     for (RowSetInfo &cand : asc_min_key) {
       const char *checkbox = "[ ]";

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/composite-pushdown-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/composite-pushdown-test.cc b/src/kudu/tablet/composite-pushdown-test.cc
index 4add5dd..47d4d31 100644
--- a/src/kudu/tablet/composite-pushdown-test.cc
+++ b/src/kudu/tablet/composite-pushdown-test.cc
@@ -27,7 +27,7 @@
 namespace kudu {
 namespace tablet {
 
-const char* const kTestHostnames[] = { "foo", "foobar", "baz", NULL };
+const char* const kTestHostnames[] = { "foo", "foobar", "baz", nullptr };
 
 class CompositePushdownTest : public KuduTabletTest {
  public:
@@ -55,7 +55,7 @@ class CompositePushdownTest : public KuduTabletTest {
     for (int16_t year = 2000; year <= 2010; year++) {
       for (int8_t month = 1; month <= 12; month++) {
         for (int8_t day = 1; day <= 28; day++) {
-          for (int host_idx = 0; kTestHostnames[host_idx] != NULL; host_idx++) {
+          for (int host_idx = 0; kTestHostnames[host_idx] != nullptr; host_idx++) {
             CHECK_OK(row.SetInt16(0, year));
             CHECK_OK(row.SetInt8(1, month));
             CHECK_OK(row.SetInt8(2, day));
@@ -141,7 +141,7 @@ TEST_F(CompositePushdownTest, TestPushDownStringInequality) {
   ColumnRangePredicate pred_year(schema_.column(0), &year, &year);
   ColumnRangePredicate pred_month(schema_.column(1), &month, &month);
   ColumnRangePredicate pred_day(schema_.column(2), &day, &day);
-  ColumnRangePredicate pred_host(schema_.column(3), NULL, &host);
+  ColumnRangePredicate pred_host(schema_.column(3), nullptr, &host);
   spec.AddPredicate(pred_year);
   spec.AddPredicate(pred_month);
   spec.AddPredicate(pred_day);
@@ -237,11 +237,11 @@ TEST_F(CompositePushdownTest, TestPushDownPrefixEqualitySuffixInequality) {
 
   ColumnRangePredicate pred_month_eq(schema_.column(1), &month_l, &month_l);
   ColumnRangePredicate pred_month_ge_le(schema_.column(1), &month_l, &month_u);
-  ColumnRangePredicate pred_month_le(schema_.column(1), NULL, &month_l);
+  ColumnRangePredicate pred_month_le(schema_.column(1), nullptr, &month_l);
 
   ColumnRangePredicate pred_day_ge_le(schema_.column(2), &day_l, &day_u);
-  ColumnRangePredicate pred_day_ge(schema_.column(2), &day_l, NULL);
-  ColumnRangePredicate pred_day_le(schema_.column(2), NULL, &day_u);
+  ColumnRangePredicate pred_day_ge(schema_.column(2), &day_l, nullptr);
+  ColumnRangePredicate pred_day_le(schema_.column(2), nullptr, &day_u);
 
   {
     // year=2001, month=9, day >= 1 && day <= 15
@@ -349,7 +349,7 @@ TEST_F(CompositePushdownTest, TestPushdownPrefixInequality) {
 
   {
     // year >= 2001
-    ColumnRangePredicate pred_year(schema_.column(0), &year_2001, NULL);
+    ColumnRangePredicate pred_year(schema_.column(0), &year_2001, nullptr);
     ScanSpec spec;
     spec.AddPredicate(pred_year);
     vector<string> results;
@@ -367,7 +367,7 @@ TEST_F(CompositePushdownTest, TestPushdownPrefixInequality) {
 
   {
     // year <= 2003
-    ColumnRangePredicate pred_year(schema_.column(0), NULL, &year_2003);
+    ColumnRangePredicate pred_year(schema_.column(0), nullptr, &year_2003);
     ScanSpec spec;
     spec.AddPredicate(pred_year);
     vector<string> results;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/delta_compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_compaction.cc b/src/kudu/tablet/delta_compaction.cc
index d2ae28e..a186c75 100644
--- a/src/kudu/tablet/delta_compaction.cc
+++ b/src/kudu/tablet/delta_compaction.cc
@@ -135,14 +135,14 @@ Status MajorDeltaCompaction::FlushRowSetAndDeltas() {
       CompactionInputRow &input_row = input_rows.at(i);
       input_row.row.Reset(&block, i);
       input_row.redo_head = redo_mutation_block[i];
-      input_row.undo_head = NULL;
+      input_row.undo_head = nullptr;
 
       RowBlockRow dst_row = block.row(i);
       RETURN_NOT_OK(CopyRow(input_row.row, &dst_row, reinterpret_cast<Arena*>(NULL)));
 
-      Mutation* new_undos_head = NULL;
+      Mutation* new_undos_head = nullptr;
       // We're ignoring the result from new_redos_head because we'll find them later at step 5).
-      Mutation* new_redos_head = NULL;
+      Mutation* new_redos_head = nullptr;
 
       bool is_garbage_collected;
 
@@ -161,10 +161,10 @@ Status MajorDeltaCompaction::FlushRowSetAndDeltas() {
         << " Redo Mutations: " << Mutation::StringifyMutationList(partial_schema_, new_redos_head);
 
       // We only create a new undo delta file if we need to.
-      if (new_undos_head != NULL && !new_undo_delta_writer_) {
+      if (new_undos_head != nullptr && !new_undo_delta_writer_) {
         RETURN_NOT_OK(OpenUndoDeltaFileWriter());
       }
-      for (const Mutation *mut = new_undos_head; mut != NULL; mut = mut->next()) {
+      for (const Mutation *mut = new_undos_head; mut != nullptr; mut = mut->next()) {
         DeltaKey undo_key(nrows + dst_row.row_index(), mut->timestamp());
         RETURN_NOT_OK(new_undo_delta_writer_->AppendDelta<UNDO>(undo_key, mut->changelist()));
         undo_stats.UpdateStats(mut->timestamp(), mut->changelist());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/deltafile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile-test.cc b/src/kudu/tablet/deltafile-test.cc
index c97726b..3005f7f 100644
--- a/src/kudu/tablet/deltafile-test.cc
+++ b/src/kudu/tablet/deltafile-test.cc
@@ -147,7 +147,7 @@ class TestDeltaFile : public ::testing::Test {
       FAIL() << "Iterator fell outside of the range of an include-all snapshot";
     }
     ASSERT_OK(s);
-    ASSERT_OK(it->Init(NULL));
+    ASSERT_OK(it->Init(nullptr));
 
     RowBlock block(schema_, 100, &arena_);
 
@@ -277,7 +277,7 @@ TEST_F(TestDeltaFile, TestCollectMutations) {
     }
     ASSERT_OK(s);
 
-    ASSERT_OK(it->Init(NULL));
+    ASSERT_OK(it->Init(nullptr));
     ASSERT_OK(it->SeekToOrdinal(0));
 
     vector<Mutation *> mutations;
@@ -293,7 +293,7 @@ TEST_F(TestDeltaFile, TestCollectMutations) {
 
       for (int i = 0; i < mutations.size(); i++) {
         Mutation *mut_head = mutations[i];
-        if (mut_head != NULL) {
+        if (mut_head != nullptr) {
           rowid_t row = start_row + i;
           string str = Mutation::StringifyMutationList(schema_, mut_head);
           VLOG(1) << "Mutation on row " << row << ": " << str;
@@ -316,23 +316,23 @@ TEST_F(TestDeltaFile, TestSkipsDeltasOutOfRange) {
   // should skip
   MvccSnapshot snap1(Timestamp(9));
   ASSERT_FALSE(snap1.MayHaveCommittedTransactionsAtOrAfter(Timestamp(10)));
-  DeltaIterator* raw_iter = NULL;
+  DeltaIterator* raw_iter = nullptr;
   Status s = reader->NewDeltaIterator(&schema_, snap1, &raw_iter);
   ASSERT_TRUE(s.IsNotFound());
-  ASSERT_TRUE(raw_iter == NULL);
+  ASSERT_TRUE(raw_iter == nullptr);
 
   // should include
-  raw_iter = NULL;
+  raw_iter = nullptr;
   MvccSnapshot snap2(Timestamp(15));
   ASSERT_OK(reader->NewDeltaIterator(&schema_, snap2, &raw_iter));
-  ASSERT_TRUE(raw_iter != NULL);
+  ASSERT_TRUE(raw_iter != nullptr);
   iter.reset(raw_iter);
 
   // should include
-  raw_iter = NULL;
+  raw_iter = nullptr;
   MvccSnapshot snap3(Timestamp(21));
   ASSERT_OK(reader->NewDeltaIterator(&schema_, snap3, &raw_iter));
-  ASSERT_TRUE(raw_iter != NULL);
+  ASSERT_TRUE(raw_iter != nullptr);
   iter.reset(raw_iter);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/deltamemstore-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltamemstore-test.cc b/src/kudu/tablet/deltamemstore-test.cc
index b319bec..60a7890 100644
--- a/src/kudu/tablet/deltamemstore-test.cc
+++ b/src/kudu/tablet/deltamemstore-test.cc
@@ -103,7 +103,7 @@ class TestDeltaMemStore : public KuduTest {
     }
     ASSERT_OK(s);
     gscoped_ptr<DeltaIterator> iter(raw_iter);
-    ASSERT_OK(iter->Init(NULL));
+    ASSERT_OK(iter->Init(nullptr));
     ASSERT_OK(iter->SeekToOrdinal(row_idx));
     ASSERT_OK(iter->PrepareBatch(cb->nrows(), DeltaIterator::PREPARE_FOR_APPLY));
     ASSERT_OK(iter->ApplyUpdates(0, cb));
@@ -418,7 +418,7 @@ TEST_F(TestDeltaMemStore, TestIteratorDoesUpdates) {
   ASSERT_OK(s);
 
   gscoped_ptr<DMSIterator> iter(down_cast<DMSIterator *>(raw_iter));
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
 
   int block_start_row = 50;
   ASSERT_OK(iter->SeekToOrdinal(block_start_row));
@@ -466,7 +466,7 @@ TEST_F(TestDeltaMemStore, TestCollectMutations) {
 
   gscoped_ptr<DMSIterator> iter(down_cast<DMSIterator *>(raw_iter));
 
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
   ASSERT_OK(iter->SeekToOrdinal(0));
   ASSERT_OK(iter->PrepareBatch(kBatchSize, DeltaIterator::PREPARE_FOR_COLLECT));
   ASSERT_OK(iter->CollectMutations(&mutations, &arena));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/deltamemstore.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltamemstore.cc b/src/kudu/tablet/deltamemstore.cc
index f6ac496..aae1294 100644
--- a/src/kudu/tablet/deltamemstore.cc
+++ b/src/kudu/tablet/deltamemstore.cc
@@ -280,8 +280,8 @@ Status DMSIterator::PrepareBatch(size_t nrows, PrepareFlag flag) {
 
           ColumnUpdate& cu = updates_by_col_[col_idx].back();
           cu.row_id = key.row_idx();
-          if (col_val == NULL) {
-            cu.new_val_ptr = NULL;
+          if (col_val == nullptr) {
+            cu.new_val_ptr = nullptr;
           } else {
             memcpy(cu.new_val_buf, col_val, col_size);
             // NOTE: we're constructing a pointer here to an element inside the deque.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/diskrowset-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/diskrowset-test.cc b/src/kudu/tablet/diskrowset-test.cc
index 877fa05..657bb42 100644
--- a/src/kudu/tablet/diskrowset-test.cc
+++ b/src/kudu/tablet/diskrowset-test.cc
@@ -400,7 +400,7 @@ TEST_F(TestRowSet, TestDeltaApplicationPerformance) {
       StringPrintf("Reading %zd rows prior to updates %d times",
                    n_rows_, FLAGS_n_read_passes));
 
-    UpdateExistingRows(rs.get(), FLAGS_update_fraction, NULL);
+    UpdateExistingRows(rs.get(), FLAGS_update_fraction, nullptr);
 
     BenchmarkIterationPerformance(*rs.get(),
       StringPrintf("Reading %zd rows with %.2f%% updates %d times (updates in DMS)",
@@ -441,7 +441,7 @@ TEST_F(TestRowSet, TestMakeDeltaIteratorMergerUnlocked) {
   // Now open the DiskRowSet for read
   shared_ptr<DiskRowSet> rs;
   ASSERT_OK(OpenTestRowSet(&rs));
-  UpdateExistingRows(rs.get(), FLAGS_update_fraction, NULL);
+  UpdateExistingRows(rs.get(), FLAGS_update_fraction, nullptr);
   ASSERT_OK(rs->FlushDeltas());
   DeltaTracker *dt = rs->delta_tracker();
   int num_stores = dt->redo_delta_stores_.size();
@@ -486,21 +486,21 @@ TEST_F(TestRowSet, TestCompactStores) {
   ASSERT_EQ(0, rs->DeltaStoresCompactionPerfImprovementScore(RowSet::MAJOR_DELTA_COMPACTION));
 
   // Write a first delta file.
-  UpdateExistingRows(rs.get(), FLAGS_update_fraction, NULL);
+  UpdateExistingRows(rs.get(), FLAGS_update_fraction, nullptr);
   ASSERT_OK(rs->FlushDeltas());
   // One file isn't enough for minor compactions, but a major compaction can run.
   ASSERT_EQ(0, rs->DeltaStoresCompactionPerfImprovementScore(RowSet::MINOR_DELTA_COMPACTION));
   BetweenZeroAndOne(rs->DeltaStoresCompactionPerfImprovementScore(RowSet::MAJOR_DELTA_COMPACTION));
 
   // Write a second delta file.
-  UpdateExistingRows(rs.get(), FLAGS_update_fraction, NULL);
+  UpdateExistingRows(rs.get(), FLAGS_update_fraction, nullptr);
   ASSERT_OK(rs->FlushDeltas());
   // Two files is enough for all delta compactions.
   BetweenZeroAndOne(rs->DeltaStoresCompactionPerfImprovementScore(RowSet::MINOR_DELTA_COMPACTION));
   BetweenZeroAndOne(rs->DeltaStoresCompactionPerfImprovementScore(RowSet::MAJOR_DELTA_COMPACTION));
 
   // Write a third delta file.
-  UpdateExistingRows(rs.get(), FLAGS_update_fraction, NULL);
+  UpdateExistingRows(rs.get(), FLAGS_update_fraction, nullptr);
   ASSERT_OK(rs->FlushDeltas());
   // We're hitting the max for minor compactions but not for major compactions.
   ASSERT_EQ(1, rs->DeltaStoresCompactionPerfImprovementScore(RowSet::MINOR_DELTA_COMPACTION));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/diskrowset.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/diskrowset.cc b/src/kudu/tablet/diskrowset.cc
index edb1d74..f4c6e21 100644
--- a/src/kudu/tablet/diskrowset.cc
+++ b/src/kudu/tablet/diskrowset.cc
@@ -172,7 +172,7 @@ Status DiskRowSetWriter::AppendBlock(const RowBlock &block) {
     RETURN_NOT_OK(bloom_writer_->AppendKeys(&enc_key, 1));
 
     // Write the batch to the ad hoc index if we're using one
-    if (ad_hoc_index_writer_ != NULL) {
+    if (ad_hoc_index_writer_ != nullptr) {
       RETURN_NOT_OK(ad_hoc_index_writer_->AppendEntries(&enc_key, 1));
     }
 
@@ -221,7 +221,7 @@ Status DiskRowSetWriter::FinishAndReleaseBlocks(ScopedWritableBlockCloser* close
   col_writer_->GetFlushedBlocksByColumnId(&flushed_blocks);
   rowset_metadata_->SetColumnDataBlocks(flushed_blocks);
 
-  if (ad_hoc_index_writer_ != NULL) {
+  if (ad_hoc_index_writer_ != nullptr) {
     Status s = ad_hoc_index_writer_->FinishAndReleaseBlock(closer);
     if (!s.ok()) {
       LOG(WARNING) << "Unable to Finish ad hoc index writer: " << s.ToString();
@@ -365,7 +365,7 @@ Status RollingDiskRowSetWriter::AppendDeltas(rowid_t row_idx_in_block,
   can_roll_ = false;
 
   *row_idx = row_idx_in_cur_drs_ + row_idx_in_block;
-  for (const Mutation *mut = delta_head; mut != NULL; mut = mut->next()) {
+  for (const Mutation *mut = delta_head; mut != nullptr; mut = mut->next()) {
     DeltaKey undo_key(*row_idx, mut->timestamp());
     RETURN_NOT_OK(writer->AppendDelta<Type>(undo_key, mut->changelist()));
     delta_stats->UpdateStats(mut->timestamp(), mut->changelist());
@@ -399,14 +399,14 @@ Status RollingDiskRowSetWriter::FinishCurrentWriter() {
 
     // If the writer is not null _AND_ we've written something to the undo
     // delta store commit the undo delta block.
-    if (cur_undo_writer_.get() != NULL &&
+    if (cur_undo_writer_.get() != nullptr &&
         cur_undo_delta_stats->min_timestamp().CompareTo(Timestamp::kMax) != 0) {
       cur_drs_metadata_->CommitUndoDeltaDataBlock(cur_undo_ds_block_id_);
     }
 
     // If the writer is not null _AND_ we've written something to the redo
     // delta store commit the redo delta block.
-    if (cur_redo_writer_.get() != NULL &&
+    if (cur_redo_writer_.get() != nullptr &&
         cur_redo_delta_stats->min_timestamp().CompareTo(Timestamp::kMax) != 0) {
       cur_drs_metadata_->CommitRedoDeltaDataBlock(0, cur_redo_ds_block_id_);
     } else {
@@ -419,9 +419,9 @@ Status RollingDiskRowSetWriter::FinishCurrentWriter() {
     written_drs_metas_.push_back(cur_drs_metadata_);
   }
 
-  cur_writer_.reset(NULL);
-  cur_undo_writer_.reset(NULL);
-  cur_redo_writer_.reset(NULL);
+  cur_writer_.reset(nullptr);
+  cur_undo_writer_.reset(nullptr);
+  cur_redo_writer_.reset(nullptr);
 
   cur_drs_metadata_.reset();
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/lock_manager-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/lock_manager-test.cc b/src/kudu/tablet/lock_manager-test.cc
index 0a405e7..5f07fc2 100644
--- a/src/kudu/tablet/lock_manager-test.cc
+++ b/src/kudu/tablet/lock_manager-test.cc
@@ -182,7 +182,7 @@ class LmTestThread {
              warn_after_ms(1000).
              warn_every_ms(5000).
              Join());
-    thread_ = NULL;
+    thread_ = nullptr;
   }
 
  private:

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/lock_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/lock_manager.cc b/src/kudu/tablet/lock_manager.cc
index 97abf49..6d79bf0 100644
--- a/src/kudu/tablet/lock_manager.cc
+++ b/src/kudu/tablet/lock_manager.cc
@@ -95,7 +95,7 @@ class LockTable {
     simple_spinlock lock;
     // First entry chained from this bucket, or NULL if the bucket is empty.
     LockEntry *chain_head;
-    Bucket() : chain_head(NULL) {}
+    Bucket() : chain_head(nullptr) {}
   };
 
  public:
@@ -108,8 +108,8 @@ class LockTable {
     // Sanity checks: The table shouldn't be destructed when there are any entries in it.
     DCHECK_EQ(0, NoBarrier_Load(&(item_count_))) << "There are some unreleased locks";
     for (size_t i = 0; i < size_; ++i) {
-      for (LockEntry *p = buckets_[i].chain_head; p != NULL; p = p->ht_next_) {
-        DCHECK(p == NULL) << "The entry " << p->ToString() << " was not released";
+      for (LockEntry *p = buckets_[i].chain_head; p != nullptr; p = p->ht_next_) {
+        DCHECK(p == nullptr) << "The entry " << p->ToString() << " was not released";
       }
     }
   }
@@ -137,12 +137,12 @@ class LockTable {
   // matches the specified 'entry'.
   // If there is no such lock entry, NULL is returned.
   LockEntry **FindEntry(Bucket *bucket, LockEntry *entry) const {
-    for (LockEntry **node = &(bucket->chain_head); *node != NULL; node = &((*node)->ht_next_)) {
+    for (LockEntry **node = &(bucket->chain_head); *node != nullptr; node = &((*node)->ht_next_)) {
       if (*node == entry) {
         return node;
       }
     }
-    return NULL;
+    return nullptr;
   }
 
   void Resize();
@@ -171,17 +171,17 @@ LockEntry *LockTable::GetLockEntry(const Slice& key) {
       boost::lock_guard<simple_spinlock> bucket_lock(bucket->lock);
       LockEntry **node = FindSlot(bucket, new_entry->key_, new_entry->key_hash_);
       old_entry = *node;
-      if (old_entry != NULL) {
+      if (old_entry != nullptr) {
         old_entry->refs_++;
       } else {
-        new_entry->ht_next_ = NULL;
+        new_entry->ht_next_ = nullptr;
         new_entry->CopyKey();
         *node = new_entry;
       }
     }
   }
 
-  if (old_entry != NULL) {
+  if (old_entry != nullptr) {
     delete new_entry;
     return old_entry;
   }
@@ -206,7 +206,7 @@ void LockTable::ReleaseLockEntry(LockEntry *entry) {
     {
       boost::lock_guard<simple_spinlock> bucket_lock(bucket->lock);
       LockEntry **node = FindEntry(bucket, entry);
-      if (node != NULL) {
+      if (node != nullptr) {
         // ASSUMPTION: There are few updates, so locking the same row at the same time is rare
         // TODO: Move out this if we're going with the TryLock
         if (--entry->refs_ > 0)
@@ -240,7 +240,7 @@ void LockTable::Resize() {
   // Copy entries
   for (size_t i = 0; i < size_; ++i) {
     LockEntry *p = buckets_[i].chain_head;
-    while (p != NULL) {
+    while (p != nullptr) {
       LockEntry *next = p->ht_next_;
 
       // Insert Entry
@@ -295,7 +295,7 @@ void ScopedRowLock::TakeState(ScopedRowLock* other) {
   ls_ = other->ls_;
 
   other->acquired_ = false;
-  other->entry_ = NULL;
+  other->entry_ = nullptr;
 }
 
 ScopedRowLock::~ScopedRowLock() {
@@ -306,7 +306,7 @@ void ScopedRowLock::Release() {
   if (entry_) {
     manager_->Release(entry_, ls_);
     acquired_ = false;
-    entry_ = NULL;
+    entry_ = nullptr;
   }
 }
 
@@ -385,7 +385,7 @@ LockManager::LockStatus LockManager::TryLock(const Slice& key,
 }
 
 void LockManager::Release(LockEntry *lock, LockStatus ls) {
-  DCHECK_NOTNULL(lock)->holder_ = NULL;
+  DCHECK_NOTNULL(lock)->holder_ = nullptr;
   if (ls == LOCK_ACQUIRED) {
     if (lock->recursion_ > 0) {
       lock->recursion_--;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/maintenance_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/maintenance_manager.cc b/src/kudu/tablet/maintenance_manager.cc
index f344430..7f6477a 100644
--- a/src/kudu/tablet/maintenance_manager.cc
+++ b/src/kudu/tablet/maintenance_manager.cc
@@ -250,26 +250,26 @@ MaintenanceOp* MaintenanceManager::FindBestOp() {
 
   if (!FLAGS_enable_maintenance_manager) {
     VLOG_AND_TRACE("maintenance", 1) << "Maintenance manager is disabled. Doing nothing";
-    return NULL;
+    return nullptr;
   }
   size_t free_threads = num_threads_ - running_ops_;
   if (free_threads == 0) {
     VLOG_AND_TRACE("maintenance", 1) << "there are no free threads, so we can't run anything.";
-    return NULL;
+    return nullptr;
   }
 
   int64_t low_io_most_logs_retained_bytes = 0;
-  MaintenanceOp* low_io_most_logs_retained_bytes_op = NULL;
+  MaintenanceOp* low_io_most_logs_retained_bytes_op = nullptr;
 
   uint64_t most_mem_anchored = 0;
-  MaintenanceOp* most_mem_anchored_op = NULL;
+  MaintenanceOp* most_mem_anchored_op = nullptr;
 
   int64_t most_logs_retained_bytes = 0;
   int64_t most_logs_retained_bytes_ram_anchored = 0;
-  MaintenanceOp* most_logs_retained_bytes_op = NULL;
+  MaintenanceOp* most_logs_retained_bytes_op = nullptr;
 
   double best_perf_improvement = 0;
-  MaintenanceOp* best_perf_improvement_op = NULL;
+  MaintenanceOp* best_perf_improvement_op = nullptr;
   for (OpMapTy::value_type &val : ops_) {
     MaintenanceOp* op(val.first);
     MaintenanceOpStats& stats(val.second);
@@ -327,7 +327,7 @@ MaintenanceOp* MaintenanceManager::FindBestOp() {
           "(current capacity is %.2f%%).  However, there are no ops currently "
           "runnable which would free memory.", capacity_pct);
       LOG(INFO) << msg;
-      return NULL;
+      return nullptr;
     }
     VLOG_AND_TRACE("maintenance", 1) << "we have exceeded our soft memory limit "
             << "(current capacity is " << capacity_pct << "%).  Running the op "
@@ -351,7 +351,7 @@ MaintenanceOp* MaintenanceManager::FindBestOp() {
       return best_perf_improvement_op;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 void MaintenanceManager::LaunchOp(MaintenanceOp* op) {
@@ -381,7 +381,7 @@ void MaintenanceManager::LaunchOp(MaintenanceOp* op) {
 }
 
 void MaintenanceManager::GetMaintenanceManagerStatusDump(MaintenanceManagerStatusPB* out_pb) {
-  DCHECK(out_pb != NULL);
+  DCHECK(out_pb != nullptr);
   lock_guard<Mutex> guard(&lock_);
   MaintenanceOp* best_op = FindBestOp();
   for (MaintenanceManager::OpMapTy::value_type& val : ops_) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/major_delta_compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/major_delta_compaction-test.cc b/src/kudu/tablet/major_delta_compaction-test.cc
index 982b7cc..1f5c69d 100644
--- a/src/kudu/tablet/major_delta_compaction-test.cc
+++ b/src/kudu/tablet/major_delta_compaction-test.cc
@@ -148,7 +148,7 @@ class TestMajorDeltaCompaction : public KuduRowSetTest {
       gscoped_ptr<RowwiseIterator> row_iter;
       ASSERT_OK(tablet()->NewRowIterator(client_schema_, snap,
                                                 Tablet::UNORDERED, &row_iter));
-      ASSERT_OK(row_iter->Init(NULL));
+      ASSERT_OK(row_iter->Init(nullptr));
 
       vector<string> results;
       ASSERT_OK(IterateToStringList(row_iter.get(), &results));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/memrowset-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/memrowset-test.cc b/src/kudu/tablet/memrowset-test.cc
index b210895..4247dc0 100644
--- a/src/kudu/tablet/memrowset-test.cc
+++ b/src/kudu/tablet/memrowset-test.cc
@@ -66,7 +66,7 @@ class TestMemRowSet : public ::testing::Test {
   void CheckValue(const shared_ptr<MemRowSet> &mrs, string key,
                   const string &expected_row) {
     gscoped_ptr<MemRowSet::Iterator> iter(mrs->NewIterator());
-    ASSERT_OK(iter->Init(NULL));
+    ASSERT_OK(iter->Init(nullptr));
 
     Slice keystr_slice(key);
     Slice key_slice(reinterpret_cast<const char *>(&keystr_slice), sizeof(Slice));
@@ -197,7 +197,7 @@ TEST_F(TestMemRowSet, TestInsertAndIterate) {
   ASSERT_EQ(2, mrs->entry_count());
 
   gscoped_ptr<MemRowSet::Iterator> iter(mrs->NewIterator());
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
 
   // The first row returned from the iterator should
   // be "goodbye" because 'g' sorts before 'h'
@@ -264,7 +264,7 @@ TEST_F(TestMemRowSet, TestInsertAndIterateCompoundKey) {
   ASSERT_EQ(3, mrs->entry_count());
 
   gscoped_ptr<MemRowSet::Iterator> iter(mrs->NewIterator());
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
 
   // The first row returned from the iterator should
   // be "goodbye" (row3) sorted on the second key

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/memrowset.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/memrowset.cc b/src/kudu/tablet/memrowset.cc
index 0b1348e..e3b369b 100644
--- a/src/kudu/tablet/memrowset.cc
+++ b/src/kudu/tablet/memrowset.cc
@@ -53,7 +53,7 @@ static const int kMaxArenaBufferSize = 8*1024*1024;
 bool MRSRow::IsGhost() const {
   bool is_ghost = false;
   for (const Mutation *mut = header_->redo_head;
-       mut != NULL;
+       mut != nullptr;
        mut = mut->next()) {
     RowChangeListDecoder decoder(mut->changelist());
     Status s = decoder.Init();
@@ -159,7 +159,7 @@ Status MemRowSet::Insert(Timestamp timestamp,
     // to mutate it when we relocate its Slices into our arena.
     DEFINE_MRSROW_ON_STACK(this, mrsrow, mrsrow_slice);
     mrsrow.header_->insertion_timestamp = timestamp;
-    mrsrow.header_->redo_head = NULL;
+    mrsrow.header_->redo_head = nullptr;
     RETURN_NOT_OK(mrsrow.CopyRow(row, arena_.get()));
 
     CHECK(mutation.Insert(mrsrow_slice))
@@ -527,14 +527,14 @@ Status MemRowSet::Iterator::ApplyMutationsToProjectedRow(
   const Mutation *mutation_head, RowBlockRow *dst_row, Arena *dst_arena) {
   // Fast short-circuit the likely case of a row which was inserted and never
   // updated.
-  if (PREDICT_TRUE(mutation_head == NULL)) {
+  if (PREDICT_TRUE(mutation_head == nullptr)) {
     return Status::OK();
   }
 
   bool is_deleted = false;
 
   for (const Mutation *mut = mutation_head;
-       mut != NULL;
+       mut != nullptr;
        mut = mut->next_) {
     if (!mvcc_snap_.IsCommitted(mut->timestamp_)) {
       // Transaction which wasn't committed yet in the reader's snapshot.
@@ -592,7 +592,7 @@ Status MemRowSet::Iterator::GetCurrentRow(RowBlockRow* dst_row,
                                           Arena* mutation_arena,
                                           Timestamp* insertion_timestamp) {
 
-  DCHECK(redo_head != NULL);
+  DCHECK(redo_head != nullptr);
 
   // Get the row from the MemRowSet. It may have a different schema from the iterator projection.
   const MRSRow src_row = GetCurrentRow();
@@ -602,11 +602,11 @@ Status MemRowSet::Iterator::GetCurrentRow(RowBlockRow* dst_row,
   // Project the RowChangeList if required
   *redo_head = src_row.redo_head();
   if (!delta_projector_.is_identity()) {
-    DCHECK(mutation_arena != NULL);
+    DCHECK(mutation_arena != nullptr);
 
-    Mutation *prev_redo = NULL;
-    *redo_head = NULL;
-    for (const Mutation *mut = src_row.redo_head(); mut != NULL; mut = mut->next()) {
+    Mutation *prev_redo = nullptr;
+    *redo_head = nullptr;
+    for (const Mutation *mut = src_row.redo_head(); mut != nullptr; mut = mut->next()) {
       RETURN_NOT_OK(RowChangeListDecoder::ProjectUpdate(delta_projector_,
                                                         mut->changelist(),
                                                         &delta_buf_));
@@ -617,7 +617,7 @@ Status MemRowSet::Iterator::GetCurrentRow(RowBlockRow* dst_row,
       Mutation *mutation = Mutation::CreateInArena(mutation_arena,
                                                    mut->timestamp(),
                                                    RowChangeList(delta_buf_));
-      if (prev_redo != NULL) {
+      if (prev_redo != nullptr) {
         prev_redo->set_next(mutation);
       } else {
         *redo_head = mutation;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/metadata-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/metadata-test.cc b/src/kudu/tablet/metadata-test.cc
index 8d5c059..a404e6d 100644
--- a/src/kudu/tablet/metadata-test.cc
+++ b/src/kudu/tablet/metadata-test.cc
@@ -39,7 +39,7 @@ class MetadataTest : public KuduTest {
   MetadataTest() {
     all_blocks_ = { BlockId(1), BlockId(2), BlockId(3), BlockId(4) };
 
-    tablet_meta_ = new TabletMetadata(NULL, "fake-tablet");
+    tablet_meta_ = new TabletMetadata(nullptr, "fake-tablet");
     CHECK_OK(RowSetMetadata::CreateNew(tablet_meta_.get(), 0, &meta_));
     for (int i = 0; i < all_blocks_.size(); i++) {
       CHECK_OK(meta_->CommitRedoDeltaDataBlock(i, all_blocks_[i]));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mt-rowset_delta_compaction-test.cc b/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
index ff7c370..0191ee6 100644
--- a/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
+++ b/src/kudu/tablet/mt-rowset_delta_compaction-test.cc
@@ -95,7 +95,7 @@ class TestMultiThreadedRowSetDeltaCompaction : public TestRowSet {
                                  MvccSnapshot::CreateSnapshotIncludingAllTransactions(),
                                  &iter));
     uint32_t expected = NoBarrier_Load(&update_counter_);
-    ASSERT_OK(iter->Init(NULL));
+    ASSERT_OK(iter->Init(nullptr));
     while (iter->HasNext()) {
       ASSERT_OK_FAST(iter->NextBlock(&dst));
       size_t n = dst.nrows();

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/mt-tablet-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mt-tablet-test.cc b/src/kudu/tablet/mt-tablet-test.cc
index ab77f19..4181530 100644
--- a/src/kudu/tablet/mt-tablet-test.cc
+++ b/src/kudu/tablet/mt-tablet-test.cc
@@ -147,7 +147,7 @@ class MultiThreadedTabletTest : public TabletTestBase<SETUP> {
           // Issue an update. In the NullableValue setup, many of the rows start with
           // NULL here, so we have to check for it.
           int32_t new_val;
-          if (old_val != NULL) {
+          if (old_val != nullptr) {
             new_val = *old_val + 1;
           } else {
             new_val = 0;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/mutation.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mutation.cc b/src/kudu/tablet/mutation.cc
index 0d94809..96b970c 100644
--- a/src/kudu/tablet/mutation.cc
+++ b/src/kudu/tablet/mutation.cc
@@ -29,7 +29,7 @@ string Mutation::StringifyMutationList(const Schema &schema, const Mutation *hea
   ret.append("[");
 
   bool first = true;
-  while (head != NULL) {
+  while (head != nullptr) {
     if (!first) {
       ret.append(", ");
     }
@@ -73,13 +73,13 @@ inline void Store<false>(Mutation** pointer, Mutation* val) {
 
 template<bool ATOMIC>
 inline void Mutation::DoAppendToList(Mutation **list) {
-  next_ = NULL;
-  if (*list == NULL) {
+  next_ = nullptr;
+  if (*list == nullptr) {
     Store<ATOMIC>(list, this);
   } else {
     // Find tail and append.
     Mutation *tail = *list;
-    while (tail->next_ != NULL) {
+    while (tail->next_ != nullptr) {
       tail = tail->next_;
     }
     Store<ATOMIC>(&tail->next_, this);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/mvcc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/mvcc-test.cc b/src/kudu/tablet/mvcc-test.cc
index 3872df1..13504ea 100644
--- a/src/kudu/tablet/mvcc-test.cc
+++ b/src/kudu/tablet/mvcc-test.cc
@@ -48,7 +48,7 @@ class MvccTest : public KuduTest {
 
   bool HasResultSnapshot() {
     boost::lock_guard<simple_spinlock> lock(lock_);
-    return result_snapshot_ != NULL;
+    return result_snapshot_ != nullptr;
   }
 
  protected:

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/rowset_tree-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/rowset_tree-test.cc b/src/kudu/tablet/rowset_tree-test.cc
index bd8aefc..4b09edb 100644
--- a/src/kudu/tablet/rowset_tree-test.cc
+++ b/src/kudu/tablet/rowset_tree-test.cc
@@ -152,7 +152,7 @@ TEST_F(TestRowSetTree, TestEndpointsConsistency) {
     enum RowSetTree::EndpointType ept = rse.endpoint_;
     const Slice& slice = rse.slice_;
 
-    ASSERT_TRUE(rs != NULL) << "RowSetTree has an endpoint with no rowset";
+    ASSERT_TRUE(rs != nullptr) << "RowSetTree has an endpoint with no rowset";
     ASSERT_TRUE(!slice.empty()) << "RowSetTree has an endpoint with no key";
 
     if (!prev.empty()) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/svg_dump.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/svg_dump.cc b/src/kudu/tablet/svg_dump.cc
index 514bd03..56af079 100644
--- a/src/kudu/tablet/svg_dump.cc
+++ b/src/kudu/tablet/svg_dump.cc
@@ -161,7 +161,7 @@ gscoped_ptr<ostream> PrepareOstream() {
   // Get default file name
   const string &pattern = FLAGS_compaction_policy_dump_svgs_pattern;
   if (pattern.empty()) return gscoped_ptr<ostream>();
-  const string path = StringReplace(pattern, "TIME", StringPrintf("%ld", time(NULL)), true);
+  const string path = StringReplace(pattern, "TIME", StringPrintf("%ld", time(nullptr)), true);
 
   // Open
   out.reset(new ofstream(path.c_str()));

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet-schema-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-schema-test.cc b/src/kudu/tablet/tablet-schema-test.cc
index 8fc2409..d87e598 100644
--- a/src/kudu/tablet/tablet-schema-test.cc
+++ b/src/kudu/tablet/tablet-schema-test.cc
@@ -116,7 +116,7 @@ TEST_F(TestTabletSchema, TestRead) {
   gscoped_ptr<RowwiseIterator> iter;
   ASSERT_OK(tablet()->NewRowIterator(projection, &iter));
 
-  Status s = iter->Init(NULL);
+  Status s = iter->Init(nullptr);
   ASSERT_TRUE(s.IsInvalidArgument());
   ASSERT_STR_CONTAINS(s.message().ToString(),
                       "Some columns are not present in the current schema: c2, c3");

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-test.cc b/src/kudu/tablet/tablet-test.cc
index 1a4de70..f0d5397 100644
--- a/src/kudu/tablet/tablet-test.cc
+++ b/src/kudu/tablet/tablet-test.cc
@@ -371,7 +371,7 @@ TYPED_TEST(TestTablet, TestRowIteratorSimple) {
   // Now iterate the tablet and make sure the rows show up
   gscoped_ptr<RowwiseIterator> iter;
   ASSERT_OK(this->tablet()->NewRowIterator(this->client_schema_, &iter));
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
 
   ASSERT_TRUE(iter->HasNext());
 
@@ -421,7 +421,7 @@ TYPED_TEST(TestTablet, TestRowIteratorOrdered) {
     gscoped_ptr<RowwiseIterator> iter;
 
     ASSERT_OK(this->tablet()->NewRowIterator(this->client_schema_, snap, Tablet::ORDERED, &iter));
-    ASSERT_OK(iter->Init(NULL));
+    ASSERT_OK(iter->Init(nullptr));
 
     // Iterate the tablet collecting rows.
     vector<shared_ptr<faststring> > rows;
@@ -504,7 +504,7 @@ TYPED_TEST(TestTablet, TestRowIteratorComplex) {
   gscoped_ptr<RowwiseIterator> iter;
   const Schema& schema = this->client_schema_;
   ASSERT_OK(this->tablet()->NewRowIterator(schema, &iter));
-  ASSERT_OK(iter->Init(NULL));
+  ASSERT_OK(iter->Init(nullptr));
   LOG(INFO) << "Created iter: " << iter->ToString();
 
   vector<bool> seen(max_rows, false);
@@ -530,7 +530,7 @@ TYPED_TEST(TestTablet, TestRowIteratorComplex) {
 
       bool set_to_null = TestSetupExpectsNulls<TypeParam>(key_idx);
       bool should_update = (key_idx % 2 == 1);
-      if (val == NULL) {
+      if (val == nullptr) {
         ASSERT_TRUE(set_to_null);
       } else if (should_update) {
         ASSERT_EQ(key_idx, *val);
@@ -680,7 +680,7 @@ TYPED_TEST(TestTablet, TestCompaction) {
     ASSERT_EQ(n_rows * 3, this->TabletCount());
 
     const RowSetMetadata *rowset_meta = this->tablet()->metadata()->GetRowSetForTests(3);
-    ASSERT_TRUE(rowset_meta != NULL);
+    ASSERT_TRUE(rowset_meta != nullptr);
     ASSERT_TRUE(rowset_meta->HasDataForColumnIdForTests(this->schema_.column_id(0)));
     ASSERT_TRUE(rowset_meta->HasBloomDataBlockForTests());
   }
@@ -688,7 +688,7 @@ TYPED_TEST(TestTablet, TestCompaction) {
   // Old rowsets should not exist anymore
   for (int i = 0; i <= 2; i++) {
     const RowSetMetadata *rowset_meta = this->tablet()->metadata()->GetRowSetForTests(i);
-    ASSERT_TRUE(rowset_meta == NULL);
+    ASSERT_TRUE(rowset_meta == nullptr);
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet.cc b/src/kudu/tablet/tablet.cc
index 5bfee03..1afa62f 100644
--- a/src/kudu/tablet/tablet.cc
+++ b/src/kudu/tablet/tablet.cc
@@ -218,7 +218,7 @@ void Tablet::Shutdown() {
   UnregisterMaintenanceOps();
 
   boost::lock_guard<rw_spinlock> lock(component_lock_);
-  components_ = NULL;
+  components_ = nullptr;
   state_ = kShutdown;
 
   // In the case of deleting a tablet, we still keep the metadata around after
@@ -414,7 +414,7 @@ Status Tablet::InsertUnlocked(WriteTransactionState *tx_state,
 
 Status Tablet::MutateRowUnlocked(WriteTransactionState *tx_state,
                                  RowOp* mutate) {
-  DCHECK(tx_state != NULL) << "you must have a WriteTransactionState";
+  DCHECK(tx_state != nullptr) << "you must have a WriteTransactionState";
   DCHECK(tx_state->op_id().IsInitialized()) << "TransactionState OpId needed for anchoring";
   DCHECK_EQ(tx_state->schema_at_decode_time(), schema());
 
@@ -897,7 +897,7 @@ void MinorDeltaCompactionOp::UpdateStats(MaintenanceOpStats* stats) {
   }
 
   double perf_improv = tablet_->GetPerfImprovementForBestDeltaCompact(
-      RowSet::MINOR_DELTA_COMPACTION, NULL);
+      RowSet::MINOR_DELTA_COMPACTION, nullptr);
   prev_stats_.set_perf_improvement(perf_improv);
   prev_stats_.set_runnable(perf_improv > 0);
   *stats = prev_stats_;
@@ -973,7 +973,7 @@ void MajorDeltaCompactionOp::UpdateStats(MaintenanceOpStats* stats) {
   }
 
   double perf_improv = tablet_->GetPerfImprovementForBestDeltaCompact(
-      RowSet::MAJOR_DELTA_COMPACTION, NULL);
+      RowSet::MAJOR_DELTA_COMPACTION, nullptr);
   prev_stats_.set_perf_improvement(perf_improv);
   prev_stats_.set_runnable(perf_improv > 0);
   *stats = prev_stats_;
@@ -1113,7 +1113,7 @@ Status Tablet::FlushMetadata(const RowSetVector& to_remove,
   RowSetMetadataIds to_remove_meta;
   for (const shared_ptr<RowSet>& rowset : to_remove) {
     // Skip MemRowSet & DuplicatingRowSets which don't have metadata.
-    if (rowset->metadata().get() == NULL) {
+    if (rowset->metadata().get() == nullptr) {
       continue;
     }
     to_remove_meta.insert(rowset->metadata()->id());
@@ -1405,7 +1405,7 @@ Status Tablet::CaptureConsistentIterators(
   ret.push_back(shared_ptr<RowwiseIterator>(ms_iter.release()));
 
   // Cull row-sets in the case of key-range queries.
-  if (spec != NULL && spec->lower_bound_key() && spec->exclusive_upper_bound_key()) {
+  if (spec != nullptr && spec->lower_bound_key() && spec->exclusive_upper_bound_key()) {
     // TODO : support open-ended intervals
     // TODO: the upper bound key is exclusive, but the RowSetTree function takes
     // an inclusive interval. So, we might end up fetching one more rowset than
@@ -1725,12 +1725,12 @@ Tablet::Iterator::Iterator(const Tablet *tablet,
 Tablet::Iterator::~Iterator() {}
 
 Status Tablet::Iterator::Init(ScanSpec *spec) {
-  DCHECK(iter_.get() == NULL);
+  DCHECK(iter_.get() == nullptr);
 
   RETURN_NOT_OK(tablet_->GetMappedReadProjection(projection_, &projection_));
 
   vector<shared_ptr<RowwiseIterator> > iters;
-  if (spec != NULL) {
+  if (spec != nullptr) {
     VLOG(3) << "Before encoding range preds: " << spec->ToString();
     encoder_.EncodeRangePredicates(spec, true);
     VLOG(3) << "After encoding range preds: " << spec->ToString();
@@ -1754,19 +1754,19 @@ Status Tablet::Iterator::Init(ScanSpec *spec) {
 }
 
 bool Tablet::Iterator::HasNext() const {
-  DCHECK(iter_.get() != NULL) << "Not initialized!";
+  DCHECK(iter_.get() != nullptr) << "Not initialized!";
   return iter_->HasNext();
 }
 
 Status Tablet::Iterator::NextBlock(RowBlock *dst) {
-  DCHECK(iter_.get() != NULL) << "Not initialized!";
+  DCHECK(iter_.get() != nullptr) << "Not initialized!";
   return iter_->NextBlock(dst);
 }
 
 string Tablet::Iterator::ToString() const {
   string s;
   s.append("tablet iterator: ");
-  if (iter_.get() == NULL) {
+  if (iter_.get() == nullptr) {
     s.append("NULL");
   } else {
     s.append(iter_->ToString());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet_bootstrap-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_bootstrap-test.cc b/src/kudu/tablet/tablet_bootstrap-test.cc
index d61c170..d4863d1 100644
--- a/src/kudu/tablet/tablet_bootstrap-test.cc
+++ b/src/kudu/tablet/tablet_bootstrap-test.cc
@@ -82,7 +82,7 @@ class BootstrapTest : public LogTestBase {
                                                TABLET_DATA_READY,
                                                meta));
     (*meta)->SetLastDurableMrsIdForTests(mrs_id);
-    if ((*meta)->GetRowSetForTests(0) != NULL) {
+    if ((*meta)->GetRowSetForTests(0) != nullptr) {
       (*meta)->GetRowSetForTests(0)->SetLastDurableRedoDmsIdForTests(delta_id);
     }
     return (*meta)->Flush();
@@ -149,7 +149,7 @@ class BootstrapTest : public LogTestBase {
     // we aren't properly setting up the clock after bootstrap.
     MvccSnapshot snap = MvccSnapshot::CreateSnapshotIncludingAllTransactions();
     ASSERT_OK(tablet->NewRowIterator(schema_, snap, Tablet::UNORDERED, &iter));
-    ASSERT_OK(iter->Init(NULL));
+    ASSERT_OK(iter->Init(nullptr));
     ASSERT_OK(IterateToStringList(iter.get(), results));
     for (const string& result : *results) {
       VLOG(1) << result;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet_bootstrap.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_bootstrap.cc b/src/kudu/tablet/tablet_bootstrap.cc
index a1a027c..5010110 100644
--- a/src/kudu/tablet/tablet_bootstrap.cc
+++ b/src/kudu/tablet/tablet_bootstrap.cc
@@ -904,7 +904,7 @@ Status TabletBootstrap::ApplyCommitMessage(ReplayState* state, LogEntryPB* commi
   pending_replicate_entry.reset(EraseKeyReturnValuePtr(&state->pending_replicates,
                                                        committed_op_id.index()));
 
-  if (pending_replicate_entry != NULL) {
+  if (pending_replicate_entry != nullptr) {
     // We found a replicate with the same index, make sure it also has the same
     // term.
     if (!OpIdEquals(committed_op_id, pending_replicate_entry->replicate().id())) {
@@ -1051,7 +1051,7 @@ Status TabletBootstrap::PlaySegments(ConsensusBootstrapInfo* consensus_info) {
       // If HandleEntry returns OK, then it has taken ownership of the entry.
       // So, we have to remove it from the entries vector to avoid it getting
       // freed by ElementDeleter.
-      entries[entry_idx] = NULL;
+      entries[entry_idx] = nullptr;
     }
 
     // If the LogReader failed to read for some reason, we'll still try to
@@ -1163,7 +1163,7 @@ Status TabletBootstrap::PlayWriteRequest(ReplicateMsg* replicate_msg,
   DCHECK(replicate_msg->has_timestamp());
   WriteRequestPB* write = replicate_msg->mutable_write_request();
 
-  WriteTransactionState tx_state(NULL, write, NULL);
+  WriteTransactionState tx_state(nullptr, write, nullptr);
   tx_state.mutable_op_id()->CopyFrom(replicate_msg->id());
   tx_state.set_timestamp(Timestamp(replicate_msg->timestamp()));
 
@@ -1200,7 +1200,7 @@ Status TabletBootstrap::PlayAlterSchemaRequest(ReplicateMsg* replicate_msg,
   Schema schema;
   RETURN_NOT_OK(SchemaFromPB(alter_schema->schema(), &schema));
 
-  AlterSchemaTransactionState tx_state(NULL, alter_schema, NULL);
+  AlterSchemaTransactionState tx_state(nullptr, alter_schema, nullptr);
 
   // TODO(KUDU-860): we should somehow distinguish if an alter table failed on its original
   // attempt (e.g due to being an invalid request, or a request with a too-early
@@ -1319,13 +1319,13 @@ Status TabletBootstrap::FilterAndApplyOperations(WriteTransactionState* tx_state
         LOG_WITH_PREFIX(FATAL) << "Bad op type: " << op->decoded_op.type;
         break;
     }
-    if (op->result != NULL) {
+    if (op->result != nullptr) {
       continue;
     }
 
     // Actually apply it.
     tablet_->ApplyRowOperation(tx_state, op);
-    DCHECK(op->result != NULL);
+    DCHECK(op->result != nullptr);
 
     // We expect that the above Apply() will always succeed, because we're
     // applying an operation that we know succeeded before the server

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet_metadata.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_metadata.cc b/src/kudu/tablet/tablet_metadata.cc
index dfaef6a..89d6fdc 100644
--- a/src/kudu/tablet/tablet_metadata.cc
+++ b/src/kudu/tablet/tablet_metadata.cc
@@ -242,7 +242,7 @@ TabletMetadata::TabletMetadata(FsManager *fs_manager, const string& tablet_id)
     tablet_id_(tablet_id),
     fs_manager_(fs_manager),
     next_rowset_idx_(0),
-    schema_(NULL),
+    schema_(nullptr),
     tombstone_last_logged_opid_(MinimumOpId()),
     num_flush_pins_(0),
     needs_flush_(false),
@@ -571,7 +571,7 @@ const RowSetMetadata *TabletMetadata::GetRowSetForTests(int64_t id) const {
       return rowset_meta.get();
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 RowSetMetadata *TabletMetadata::GetRowSetForTests(int64_t id) {
@@ -581,7 +581,7 @@ RowSetMetadata *TabletMetadata::GetRowSetForTests(int64_t id) {
       return rowset_meta.get();
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 void TabletMetadata::SetSchema(const Schema& schema, uint32_t version) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/tablet_peer.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_peer.cc b/src/kudu/tablet/tablet_peer.cc
index bee4465..91398cc 100644
--- a/src/kudu/tablet/tablet_peer.cc
+++ b/src/kudu/tablet/tablet_peer.cc
@@ -176,7 +176,7 @@ Status TabletPeer::Init(const shared_ptr<Tablet>& tablet,
     }
   }
 
-  if (tablet_->metrics() != NULL) {
+  if (tablet_->metrics() != nullptr) {
     TRACE("Starting instrumentation");
     txn_tracker_.StartInstrumentation(tablet_->GetMetricEntity());
   }
@@ -348,8 +348,8 @@ Status TabletPeer::SubmitAlterSchema(gscoped_ptr<AlterSchemaTransactionState> st
 
 void TabletPeer::GetTabletStatusPB(TabletStatusPB* status_pb_out) const {
   boost::lock_guard<simple_spinlock> lock(lock_);
-  DCHECK(status_pb_out != NULL);
-  DCHECK(status_listener_.get() != NULL);
+  DCHECK(status_pb_out != nullptr);
+  DCHECK(status_listener_.get() != nullptr);
   status_pb_out->set_tablet_id(status_listener_->tablet_id());
   status_pb_out->set_table_name(status_listener_->table_name());
   status_pb_out->set_last_status(status_listener_->last_status());
@@ -399,7 +399,7 @@ void TabletPeer::GetInFlightTransactions(Transaction::TraceType trace_type,
   vector<scoped_refptr<TransactionDriver> > pending_transactions;
   txn_tracker_.GetPendingTransactions(&pending_transactions);
   for (const scoped_refptr<TransactionDriver>& driver : pending_transactions) {
-    if (driver->state() != NULL) {
+    if (driver->state() != nullptr) {
       consensus::TransactionStatusPB status_pb;
       status_pb.mutable_op_id()->CopyFrom(driver->GetOpId());
       switch (driver->tx_type()) {
@@ -503,7 +503,8 @@ Status TabletPeer::StartReplicaTransaction(const scoped_refptr<ConsensusRound>&
           " transaction must receive an AlterSchemaRequestPB";
       transaction.reset(
           new AlterSchemaTransaction(
-              new AlterSchemaTransactionState(this, &replicate_msg->alter_schema_request(), NULL),
+              new AlterSchemaTransactionState(this, &replicate_msg->alter_schema_request(),
+                                              nullptr),
               consensus::REPLICA));
       break;
     }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/transactions/alter_schema_transaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/alter_schema_transaction.cc b/src/kudu/tablet/transactions/alter_schema_transaction.cc
index 79cc7f7..9defd83 100644
--- a/src/kudu/tablet/transactions/alter_schema_transaction.cc
+++ b/src/kudu/tablet/transactions/alter_schema_transaction.cc
@@ -45,8 +45,8 @@ string AlterSchemaTransactionState::ToString() const {
   return Substitute("AlterSchemaTransactionState "
                     "[timestamp=$0, schema=$1, request=$2]",
                     timestamp().ToString(),
-                    schema_ == NULL ? "(none)" : schema_->ToString(),
-                    request_ == NULL ? "(none)" : request_->ShortDebugString());
+                    schema_ == nullptr ? "(none)" : schema_->ToString(),
+                    request_ == nullptr ? "(none)" : request_->ShortDebugString());
 }
 
 void AlterSchemaTransactionState::AcquireSchemaLock(rw_semaphore* l) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/35b49cc5/src/kudu/tablet/transactions/transaction_driver.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction_driver.cc b/src/kudu/tablet/transactions/transaction_driver.cc
index eff4a46..4a63fe3 100644
--- a/src/kudu/tablet/transactions/transaction_driver.cc
+++ b/src/kudu/tablet/transactions/transaction_driver.cc
@@ -99,11 +99,11 @@ consensus::OpId TransactionDriver::GetOpId() {
 }
 
 const TransactionState* TransactionDriver::state() const {
-  return transaction_ != NULL ? transaction_->state() : NULL;
+  return transaction_ != nullptr ? transaction_->state() : nullptr;
 }
 
 TransactionState* TransactionDriver::mutable_state() {
-  return transaction_ != NULL ? transaction_->state() : NULL;
+  return transaction_ != nullptr ? transaction_->state() : nullptr;
 }
 
 Transaction::TransactionType TransactionDriver::tx_type() const {
@@ -117,7 +117,7 @@ string TransactionDriver::ToString() const {
 
 string TransactionDriver::ToStringUnlocked() const {
   string ret = StateString(replication_state_, prepare_state_);
-  if (transaction_ != NULL) {
+  if (transaction_ != nullptr) {
     ret += " " + transaction_->ToString();
   } else {
     ret += "[unknown txn]";


Mime
View raw message