summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r--apt-pkg/contrib/strutl.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index daf87c87f..f37045810 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -972,15 +972,14 @@ bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base)
// ---------------------------------------------------------------------
/* This is used in decoding the 256bit encoded fixed length fields in
tar files */
-bool Base256ToNum(const char *Str,unsigned long &Res,unsigned Len)
+bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len)
{
- int i;
if ((Str[0] & 0x80) == 0)
return false;
else
{
Res = Str[0] & 0x7F;
- for(i=1; i<Len; i++)
+ for(unsigned int i = 1; i < Len; ++i)
Res = (Res<<8) + Str[i];
return true;
}