hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject incubator-hawq git commit: HAWQ-1022. Bugfix for getCommandOutput: using reference to temporary variable in stack address.
Date Thu, 25 Aug 2016 11:54:51 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 48c34ca64 -> b13ca83bf


HAWQ-1022. Bugfix for getCommandOutput: using reference to temporary variable in stack address.


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

Branch: refs/heads/master
Commit: b13ca83bf3d065265f3129edd318a226cd9f9687
Parents: 48c34ca
Author: xunzhang <xunzhangthu@gmail.com>
Authored: Thu Aug 25 18:24:52 2016 +0800
Committer: xunzhang <xunzhangthu@gmail.com>
Committed: Thu Aug 25 19:04:04 2016 +0800

----------------------------------------------------------------------
 src/test/feature/lib/command.cpp | 4 ++--
 src/test/feature/lib/command.h   | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b13ca83b/src/test/feature/lib/command.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/command.cpp b/src/test/feature/lib/command.cpp
index d46aaf0..7f5f34a 100644
--- a/src/test/feature/lib/command.cpp
+++ b/src/test/feature/lib/command.cpp
@@ -73,14 +73,14 @@ void Command::_saveToFile() {
   out.close(); 
 }
 
-const string& Command::getCommandOutput(const string& cmd) {
+const string Command::getCommandOutput(const string& cmd) {
   return Command()
       .setCommand(cmd)
       .run()
       .getResultOutput();
 }
 
-const string& Command::getCommandOutput(const string& cmd,
+const string Command::getCommandOutput(const string& cmd,
                                         const string& out) {
   return Command()
       .setCommand(cmd)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b13ca83b/src/test/feature/lib/command.h
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/command.h b/src/test/feature/lib/command.h
index 931b3bc..e0ae97f 100644
--- a/src/test/feature/lib/command.h
+++ b/src/test/feature/lib/command.h
@@ -18,12 +18,12 @@ class Command {
   Command& run();
   Command& setCommand(const std::string&);
   Command& setOutputFile(const std::string&);
-  const std::string& getCommand() const; 
-  const std::string& getResultOutput() const; 
+  const std::string& getCommand() const;
+  const std::string& getResultOutput() const;
   int getResultStatus() const;
 
-  static const std::string& getCommandOutput(const std::string& cmd);
-  static const std::string& getCommandOutput(const std::string& cmd, const std::string&
out);
+  static const std::string getCommandOutput(const std::string& cmd);
+  static const std::string getCommandOutput(const std::string& cmd, const std::string&
out);
   static int getCommandStatus(const std::string& cmd);
   static int getCommandStatus(const std::string& cmd, const std::string& out);
 


Mime
View raw message