diff options
-rw-r--r-- | Source/cmFileCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmake.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aab256a..2c92db2 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -745,7 +745,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args) // A non-string character has been found. Check if the current // string matches the requirements. We require that the length // be at least one no matter what the user specified. - if(s.length() >= minlen && s.length() >= 1 && + if(s.length() >= minlen && !s.empty() && (!have_regex || regex.find(s.c_str()))) { output_size += static_cast<int>(s.size()) + 1; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 7accec2..29d8206 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2531,7 +2531,7 @@ static bool cmakeCheckStampFile(const char* stampName) while(cmSystemTools::GetLineFromStream(fin, dep)) { int result; - if(dep.length() >= 1 && dep[0] != '#' && + if(!dep.empty() && dep[0] != '#' && (!ftc.FileTimeCompare(stampDepends.c_str(), dep.c_str(), &result) || result < 0)) { |