summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-02-04 18:33:30 +0100
committerJulian Andres Klode <jak@debian.org>2016-02-04 18:34:42 +0100
commit72ed5f14b558984bd9c5731f82345b10cb2df2ca (patch)
tree392ce15f137d8ec7255a44a627a33eb2be2d4e0d /apt-pkg/contrib/fileutl.cc
parenteb5113c486955d9cd66126aa59d3a27e52c52e58 (diff)
Use some semantically more correct buffer operations
When writing into the buffer write to free() bytes starting at getend(), instead of buffersize_max bytes at get() -> get() is a read pointer. This makes no difference in practice though, as we reset the buffer before the call, so start = end = 0. Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r--apt-pkg/contrib/fileutl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index fcdaee644..297172eea 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -1054,7 +1054,7 @@ public:
{
buffer.reset();
unsigned long long actualread = 0;
- if (filefd->Read(buffer.get(), buffer.buffersize_max, &actualread) == false)
+ if (filefd->Read(buffer.getend(), buffer.free(), &actualread) == false)
return nullptr;
buffer.bufferend = actualread;
if (buffer.size() == 0)