summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/deb/deblistparser.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index fd5a1e475..73628c741 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -784,7 +784,9 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
size_t len = 0;
// Skip empty lines
- for (; buffer[len] == '\r' && buffer[len] == '\n'; ++len);
+ for (; buffer[len] == '\r' && buffer[len] == '\n'; ++len)
+ /* nothing */
+ ;
if (buffer[len] == '\0')
continue;
@@ -798,16 +800,24 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
}
// seperate the tag from the data
- for (; buffer[len] != ':' && buffer[len] != '\0'; ++len);
+ for (; buffer[len] != ':' && buffer[len] != '\0'; ++len)
+ /* nothing */
+ ;
if (buffer[len] == '\0')
continue;
char* dataStart = buffer + len;
- for (++dataStart; *dataStart == ' '; ++dataStart);
+ for (++dataStart; *dataStart == ' '; ++dataStart)
+ /* nothing */
+ ;
char* dataEnd = dataStart;
- for (++dataEnd; *dataEnd != '\0'; ++dataEnd);
+ for (++dataEnd; *dataEnd != '\0'; ++dataEnd)
+ /* nothing */
+ ;
// The last char should be a newline, but we can never be sure: #633350
char* lineEnd = dataEnd;
- for (--lineEnd; *lineEnd == '\r' || *lineEnd == '\n'; --lineEnd);
+ for (--lineEnd; *lineEnd == '\r' || *lineEnd == '\n'; --lineEnd)
+ /* nothing */
+ ;
++lineEnd;
// which datastorage need to be updated