cmCacheManager: clarify whitespace skipping

Originally noticed as not comparing to `\0` (NUL), the condition is
actually redundant as neither `\0` nor `0` will match the "is
whitespace" check in the rest of the predicate. `NUL` is checked for in
the following `if` block.
This commit is contained in:
Ben Boeckel
2025-04-01 11:26:48 +02:00
parent fc3e3cd2e4
commit a5281fd635

View File

@@ -58,9 +58,8 @@ bool cmCacheManager::LoadCache(std::string const& path, bool internal,
cmSystemTools::GetLineFromStream(fin, buffer);
lineno++;
realbuffer = buffer.c_str();
while (*realbuffer != '0' &&
(*realbuffer == ' ' || *realbuffer == '\t' || *realbuffer == '\r' ||
*realbuffer == '\n')) {
while (*realbuffer == ' ' || *realbuffer == '\t' || *realbuffer == '\r' ||
*realbuffer == '\n') {
if (*realbuffer == '\n') {
lineno++;
}