mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
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:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user