summaryrefslogtreecommitdiff
path: root/cmdline/apt-dump-solver.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-06-23 16:12:41 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2020-06-23 16:12:41 +0200
commitb5faca7a90e1aa25adb8ee69b979d1f4bd7e8d78 (patch)
treecf9f470cc080b9a07974f84d686e3091c2d5a1a3 /cmdline/apt-dump-solver.cc
parenta1464cb4025cd737ac57ea7392402d5efd2af027 (diff)
Replace some magic 64*1024 with APT_BUFFER_SIZE
Diffstat (limited to 'cmdline/apt-dump-solver.cc')
-rw-r--r--cmdline/apt-dump-solver.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index 24a9f23eb..ab44b9fd1 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -134,11 +134,10 @@ int main(int argc,const char *argv[]) /*{{{*/
return WriteError("ERR_READ_ERROR", out, stdoutfd, Solver);
}
- constexpr size_t BufSize = 64 * 1024;
- std::unique_ptr<char[]> Buf(new char[BufSize]);
+ std::unique_ptr<char[]> Buf(new char[APT_BUFFER_SIZE]);
unsigned long long ToRead = 0;
do {
- if (input.Read(Buf.get(),BufSize, &ToRead) == false)
+ if (input.Read(Buf.get(), APT_BUFFER_SIZE, &ToRead) == false)
{
std::ostringstream out;
out << "Writing EDSP solver input to file '" << filename << "' failed as reading from stdin failed!\n";