You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/01/30 03:21:08 UTC

mesos git commit: Trim whitespace before parsing 'perf --version' output.

Repository: mesos
Updated Branches:
  refs/heads/master b068da891 -> 97ccbd23f


Trim whitespace before parsing 'perf --version' output.


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

Branch: refs/heads/master
Commit: 97ccbd23f97dadc42c877800a88cf20a4abd5cf6
Parents: b068da8
Author: Benjamin Mahler <be...@gmail.com>
Authored: Fri Jan 29 18:19:36 2016 -0800
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Fri Jan 29 18:20:53 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/97ccbd23/src/linux/perf.cpp
----------------------------------------------------------------------
diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp
index 9dd8ca4..1c113a2 100644
--- a/src/linux/perf.cpp
+++ b/src/linux/perf.cpp
@@ -268,9 +268,11 @@ Future<Version> version()
 
   return output
     .then([](const string& output) -> Future<Version> {
+      string trimmed = strings::trim(output);
+
       // Trim off the leading 'perf version ' text to convert.
-      return Version::parse(strings::remove(
-          output, "perf version ", strings::PREFIX));
+      return Version::parse(
+          strings::remove(trimmed, "perf version ", strings::PREFIX));
     });
 };