summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/testSystemTools.cxx')
-rw-r--r--Source/kwsys/testSystemTools.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 4d97688..4dab347 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -848,9 +848,9 @@ static bool CheckPutEnv(const std::string& env, const char* name, const char* va
<< "\") failed!" << std::endl;
return false;
}
- const char* v = kwsys::SystemTools::GetEnv(name);
- v = v? v : "(null)";
- if(strcmp(v, value) != 0)
+ std::string v = "(null)";
+ kwsys::SystemTools::GetEnv(name, v);
+ if(v != value)
{
std::cerr << "GetEnv(\"" << name << "\") returned \""
<< v << "\", not \"" << value << "\"!" << std::endl;
@@ -867,7 +867,8 @@ static bool CheckUnPutEnv(const char* env, const char* name)
<< std::endl;
return false;
}
- if(const char* v = kwsys::SystemTools::GetEnv(name))
+ std::string v;
+ if(kwsys::SystemTools::GetEnv(name, v))
{
std::cerr << "GetEnv(\"" << name << "\") returned \""
<< v << "\", not (null)!" << std::endl;