kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [2/2] incubator-kudu git commit: Avoid logging nullptr in sasl_helper
Date Fri, 29 Jan 2016 00:29:17 GMT
Avoid logging nullptr in sasl_helper

Change-Id: Iab1f9d714d858e48e983e4ac44aa6e4b4d57f6c3
Reviewed-on: http://gerrit.cloudera.org:8080/1954
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/eb592b29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/eb592b29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/eb592b29

Branch: refs/heads/master
Commit: eb592b298c25232505a1d749e06bb84c78186c74
Parents: 222ba73
Author: Dan Burkert <dan@cloudera.com>
Authored: Thu Jan 28 15:53:13 2016 -0800
Committer: Dan Burkert <dan@cloudera.com>
Committed: Fri Jan 29 00:28:47 2016 +0000

----------------------------------------------------------------------
 src/kudu/rpc/sasl_helper.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/eb592b29/src/kudu/rpc/sasl_helper.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_helper.cc b/src/kudu/rpc/sasl_helper.cc
index 79d46e9..0309f0c 100644
--- a/src/kudu/rpc/sasl_helper.cc
+++ b/src/kudu/rpc/sasl_helper.cc
@@ -104,7 +104,8 @@ int SaslHelper::GetOptionCb(const char* plugin_name, const char* option,
   }
 
   DVLOG(4) << tag_ << ": GetOption Callback called. ";
-  DVLOG(4) << tag_ << ": GetOption Plugin name: " << plugin_name;
+  DVLOG(4) << tag_ << ": GetOption Plugin name: "
+                   << (plugin_name == nullptr ? "NULL" : plugin_name);
   DVLOG(4) << tag_ << ": GetOption Option name: " << option;
 
   if (PREDICT_FALSE(result == nullptr)) {
@@ -117,7 +118,7 @@ int SaslHelper::GetOptionCb(const char* plugin_name, const char* option,
     if (cb_name == option) {
       *result = LocalMechListString();
       if (len != nullptr) *len = strlen(*result);
-      DVLOG(3) << tag_ << ": Enabled mech list: " << *result;
+      DVLOG(3) << tag_ << ": Enabled mech list: " << (*result == nullptr
? "NULL" : *result);
       return SASL_OK;
     }
     VLOG(4) << tag_ << ": GetOptionCb: Unknown library option: " << option;


Mime
View raw message