summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-11-12 13:29:09 +0000
committerJulian Andres Klode <jak@debian.org>2024-11-12 13:29:09 +0000
commit8fd0ebc330bcdbced85877ff48bf40582bf983f9 (patch)
tree9e8c83e567731fba5f00cc959b075fa0ee9533ba /apt-pkg/acquire-item.cc
parent8342f913c05c453e784bf038745351047d09af0a (diff)
parenta05e6fe18329ff8d91acf10efd4a1408858b0fda (diff)
Merge branch 'more' into 'main'
APT_BUFFER_SIZE pkgTagFile default size. std::vector(1024) -> std::array<1024>. dpkgpm buffers See merge request apt-team/apt!390
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index b534d56a3..3016dad59 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -4065,7 +4065,7 @@ static std::string GetAuxFileNameFromURIInLists(std::string const &uri)
auto const dirname = flCombine(_config->FindDir("Dir::State::lists"), "auxfiles/");
char const * const filetag = ".apt-acquire-privs-test.XXXXXX";
std::string const tmpfile_tpl = flCombine(dirname, filetag);
- std::unique_ptr<char, decltype(std::free) *> tmpfile { strdup(tmpfile_tpl.c_str()), std::free };
+ std::unique_ptr<char, FreeDeleter> tmpfile { strdup(tmpfile_tpl.c_str()) };
int const fd = mkstemp(tmpfile.get());
if (fd == -1)
return "";
@@ -4081,7 +4081,7 @@ static std::string GetAuxFileNameFromURI(std::string const &uri)
std::string tmpdir_tpl;
strprintf(tmpdir_tpl, "%s/apt-auxfiles-XXXXXX", GetTempDir().c_str());
- std::unique_ptr<char, decltype(std::free) *> tmpdir { strndup(tmpdir_tpl.data(), tmpdir_tpl.length()), std::free };
+ std::unique_ptr<char, FreeDeleter> tmpdir { strndup(tmpdir_tpl.data(), tmpdir_tpl.length()) };
if (mkdtemp(tmpdir.get()) == nullptr)
{
_error->Errno("GetAuxFileNameFromURI", "mkdtemp of %s failed", tmpdir.get());