Updated Branches:
  refs/heads/master 6f7a4d745 -> 9bcdcca29

Fixed os::chdir return value checking in launcher.cpp.

From: Vinson Lee <v...@freedesktop.org>
Review: https://reviews.apache.org/r/13880


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

Branch: refs/heads/master
Commit: bb5acfe3cff4af555b5d86878ad068b4b031d347
Parents: 6f7a4d7
Author: Benjamin Mahler <bmah...@twitter.com>
Authored: Thu Aug 29 17:16:18 2013 -0700
Committer: Benjamin Mahler <bmah...@twitter.com>
Committed: Thu Aug 29 17:16:18 2013 -0700

----------------------------------------------------------------------
 src/launcher/launcher.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/bb5acfe3/src/launcher/launcher.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/launcher.cpp b/src/launcher/launcher.cpp
index 7bf127a..6f2677a 100644
--- a/src/launcher/launcher.cpp
+++ b/src/launcher/launcher.cpp
@@ -135,7 +135,7 @@ int ExecutorLauncher::setup()
   }
 
   // Enter working directory.
-  if (os::chdir(workDirectory) < 0) {
+  if (!os::chdir(workDirectory)) {
     cerr << "Failed to chdir into executor work directory" << endl;
     return -1;
   }
@@ -160,7 +160,7 @@ int ExecutorLauncher::setup()
   }
 
   // Go back to previous directory.
-  if (os::chdir(cwd) < 0) {
+  if (!os::chdir(cwd)) {
     cerr << "Failed to chdir (back) into slave directory" << endl;
     return -1;
   }

Reply via email to