aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-27 09:54:24 +0200
committerGitHub <noreply@github.com>2021-07-27 09:54:24 +0200
commit9deeab63372faba6c7fb31fe099264f79388d72b (patch)
treec0a11ea1808d4b79012afc66505e4bf9918cb111
parentda9b2cd74e484d2d642cd344016a7b97c7536cda (diff)
parent369ed71858b50529242fd0b9d274cc13b96ded05 (diff)
Merge pull request #5043 from alyssais/vexing
libutil: use uniform initialization in _deletePath
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index b8334defc..d876315c8 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -435,7 +435,7 @@ static void _deletePath(const Path & path, uint64_t & bytesFreed)
if (dir == "")
dir = "/";
- AutoCloseFD dirfd(open(dir.c_str(), O_RDONLY));
+ AutoCloseFD dirfd{open(dir.c_str(), O_RDONLY)};
if (!dirfd) {
if (errno == ENOENT) return;
throw SysError("opening directory '%1%'", path);