diff options
| author | Julian Andres Klode <jak@debian.org> | 2024-11-07 12:46:19 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2024-11-07 12:46:19 +0000 |
| commit | e362d060a47ec3c7f487fa8e37eddbc72ac02d13 (patch) | |
| tree | 9bba879b213982bac78db424ea595e7dbee9e034 /apt-pkg | |
| parent | bc1fbd12789bfebf225be7af5052840a6add21e2 (diff) | |
| parent | a05376bca3649da9e8ca2c48836aad1d27f7d1db (diff) | |
Merge branch 'rwl' into 'main'
Bump read()/write() loop buffers from 4k to APT_BUFFER_SIZE (64k). Bump FileFdPrivate's read()/discard buffer from 1k to APT_BUFFER_SIZE (64k)
See merge request apt-team/apt!381
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/contrib/fileutl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 262d1c8b3..4ad7b4cd5 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1246,7 +1246,7 @@ public: } virtual bool InternalSkip(unsigned long long Over) { - unsigned long long constexpr buffersize = 1024; + unsigned long long constexpr buffersize = APT_BUFFER_SIZE; char buffer[buffersize]; while (Over != 0) { @@ -1273,11 +1273,10 @@ public: { unsigned long long size = 0; unsigned long long const oldSeek = filefd->Tell(); - unsigned long long constexpr ignoresize = 1024; - char ignore[ignoresize]; + char ignore[APT_BUFFER_SIZE]; unsigned long long read = 0; do { - if (filefd->Read(ignore, ignoresize, &read) == false) + if (filefd->Read(ignore, sizeof(ignore), &read) == false) { filefd->Seek(oldSeek); return 0; |
