diff options
author | Michael Vogt <mvo@debian.org> | 2014-06-12 08:44:13 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-06-12 08:44:13 +0200 |
commit | 826c5fa7b541e93928791470e5df9342cb7db5ed (patch) | |
tree | 80dbc4356344653e80beeb03e51a6b5eb6e50e01 /apt-pkg | |
parent | b2cde5777fd9ab41d1b9fe5ce91196c0d3e8227d (diff) | |
parent | acea28d0a3a55c4df1390c42288043002610fbc9 (diff) |
Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into ubuntu/trusty
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/hashes.cc | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/hashes.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index 1fce0d75f..15f83615d 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -133,7 +133,7 @@ bool Hashes::AddFD(int const Fd,unsigned long long Size, bool const addMD5, bool const addSHA1, bool const addSHA256, bool const addSHA512) { unsigned char Buf[64*64]; - bool const ToEOF = (Size == 0); + bool const ToEOF = (Size == UntilEOF); while (Size != 0 || ToEOF) { unsigned long long n = sizeof(Buf); diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 5cd1af03b..7a62f8a8f 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -78,6 +78,8 @@ class Hashes SHA256Summation SHA256; SHA512Summation SHA512; + static const int UntilEOF = 0; + inline bool Add(const unsigned char *Data,unsigned long long Size) { return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size); |