From: Jay Freeman (saurik) Date: Mon, 13 Aug 2018 06:21:53 +0000 (-0700) Subject: https://stackoverflow.com/questions/12351460/redeclaration-of-a-variable-in-a-for... X-Git-Url: https://git.saurik.com/apt-legacy.git/commitdiff_plain/b62917f161e80c11d4c3265006102d8d2c1651c5 https://stackoverflow.com/questions/12351460/redeclaration-of-a-variable-in-a-for-loop-in-c --- diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 20739e0..933215a 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -245,6 +245,7 @@ unsigned short debListParser::VersionHash() if (Section.Find(*I,Start,End) == false || End - Start >= (signed)sizeof(S)) continue; + { /* Strip out any spaces from the text, this undoes dpkgs reformatting of certain fields. dpkg also has the rather interesting notion of reformatting depends operators < -> <= */ @@ -260,6 +261,7 @@ unsigned short debListParser::VersionHash() } Result = AddCRC16(Result,S,I - S); + } } return Result;