summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorHerman Semenoff <GermanAizek@yandex.ru>2026-04-08 12:58:55 +0300
committerJulian Andres Klode <jak@debian.org>2026-04-08 10:41:43 +0000
commit23dba65f031954df896bc3c6dfb1a9705574886b (patch)
tree1f40f2afce10e3b793540e9905b624f113c2ee15 /apt-pkg/acquire.cc
parentfbde7ea4ce304a30e155a2bd9d014d196abbb496 (diff)
apt: modernize to make_unique C++17
References: - https://stackoverflow.com/questions/79700634/pros-and-cons-of-make-unique-vs-direct-constructor-call-in-c17 - https://towardsdev.com/why-std-make-unique-beats-new-in-modern-c-7e2ba653737e - https://www.sololearn.com/en/Discuss/3334779/where-make_unique-is-better-than-unique_ptrraw-pointer
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 7a60c4476..95b6391cd 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -636,7 +636,7 @@ static void CheckDropPrivsMustBeDisabled(pkgAcquire const &Fetcher)
gid_t const old_egid = getegid();
long const ngroups_max = sysconf(_SC_NGROUPS_MAX);
- std::unique_ptr<gid_t[]> old_gidlist(new gid_t[ngroups_max]);
+ auto old_gidlist = std::make_unique<gid_t[]>(ngroups_max);
if (unlikely(old_gidlist == NULL))
return;
ssize_t old_gidlist_nr;