summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index b8163c8..1de2358 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -359,18 +359,11 @@ bool cmSystemTools::IsOn(const char* val)
bool cmSystemTools::IsNOTFOUND(const char* val)
{
- size_t len = strlen(val);
- const char* notfound = "-NOTFOUND";
- const size_t lenNotFound = 9;
- if(len < lenNotFound-1)
+ if(strcmp(val, "NOTFOUND") == 0)
{
- return false;
- }
- if(len == lenNotFound-1)
- {
- return ( strcmp(val, "NOTFOUND") == 0);
+ return true;
}
- return ((strncmp((val + (len - lenNotFound)), notfound, lenNotFound) == 0));
+ return cmHasLiteralSuffix(val, "-NOTFOUND");
}