summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/hashes.cc')
-rw-r--r--apt-pkg/contrib/hashes.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 662c2bf8b..5a1d356f1 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -13,19 +13,19 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/hashes.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
#include <apt-pkg/sha2.h>
-#include <stddef.h>
#include <algorithm>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string>
#include <iostream>
+#include <string>
+#include <stddef.h>
+#include <stdlib.h>
+#include <unistd.h>
/*}}}*/
const char * HashString::_SupportedHashes[] =
@@ -339,7 +339,7 @@ bool Hashes::AddFD(int const Fd,unsigned long long Size)
bool const ToEOF = (Size == UntilEOF);
while (Size != 0 || ToEOF)
{
- unsigned long long n = sizeof(Buf);
+ decltype(Size) n = sizeof(Buf);
if (!ToEOF) n = std::min(Size, n);
ssize_t const Res = read(Fd,Buf,n);
if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read
@@ -363,9 +363,9 @@ bool Hashes::AddFD(FileFd &Fd,unsigned long long Size)
bool const ToEOF = (Size == 0);
while (Size != 0 || ToEOF)
{
- unsigned long long n = sizeof(Buf);
+ decltype(Size) n = sizeof(Buf);
if (!ToEOF) n = std::min(Size, n);
- unsigned long long a = 0;
+ decltype(Size) a = 0;
if (Fd.Read(Buf, n, &a) == false) // error
return false;
if (ToEOF == false)