kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject kudu git commit: [util] fix compilation on OS X
Date Thu, 07 Jun 2018 05:42:51 GMT
Repository: kudu
Updated Branches:
  refs/heads/master ccdcf6cea -> 044c210de


[util] fix compilation on OS X

This is a follow-up for 8719014f2523671b33fde92c110f219107d14a99.

Change-Id: I283f6980c305596875b3ddfa2f06a3cb4517a1e6
Reviewed-on: http://gerrit.cloudera.org:8080/10632
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>
Tested-by: Alexey Serbin <aserbin@cloudera.com>


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

Branch: refs/heads/master
Commit: 044c210de1c2a89d954e620a5543d9ef20d08283
Parents: ccdcf6c
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Wed Jun 6 22:13:53 2018 -0700
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Thu Jun 7 05:41:23 2018 +0000

----------------------------------------------------------------------
 src/kudu/util/test_util.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/044c210d/src/kudu/util/test_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/test_util.cc b/src/kudu/util/test_util.cc
index 65e8fdc..f612393 100644
--- a/src/kudu/util/test_util.cc
+++ b/src/kudu/util/test_util.cc
@@ -343,15 +343,15 @@ int CountOpenFds(Env* env, const string& path_pattern) {
     CHECK(safe_strto32(c, &fd)) << "Unexpected file in fd list: " << c;
 #ifdef __APPLE__
     path_buf.resize(MAXPATHLEN);
-    char* buf_data = reinterpret_cast<char*>(path_buf.data());
     if (fcntl(fd, F_GETPATH, path_buf.data()) != 0) {
       if (errno == EBADF) {
         // The file was closed while we were looping. This is likely the
         // actual file descriptor used for opening /proc/fd itself.
         continue;
       }
-      PLOG(FATAL) << "Unknown error in fcntl(F_GETPATH): " << proc_file;
+      PLOG(FATAL) << "Unknown error in fcntl(F_GETPATH): " << fd;
     }
+    char* buf_data = reinterpret_cast<char*>(path_buf.data());
     path_buf.resize(strlen(buf_data));
 #else
     path_buf.resize(PATH_MAX);


Mime
View raw message