From d7c4ec4287594756a11b98ab73b4663741b5ad2a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 31 Jul 2022 19:08:38 +0100 Subject: Fix shadowing --- libadhocutil/fileUtils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libadhocutil/fileUtils.cpp b/libadhocutil/fileUtils.cpp index 4221182..f0e36b5 100644 --- a/libadhocutil/fileUtils.cpp +++ b/libadhocutil/fileUtils.cpp @@ -133,22 +133,22 @@ namespace AdHoc::FileUtils { void * MemMap::setupMap(int flags) const { - auto data = setupMapInt(flags); + auto newData = setupMapInt(flags); // NOLINTNEXTLINE(performance-no-int-to-ptr) - if (data == MAP_FAILED) { + if (newData == MAP_FAILED) { throw SystemExceptionOn("mmap(2) failed", strerror(errno), errno, FD::get(fh)); } - return data; + return newData; } void * MemMap::setupMap(const std::filesystem::path & path, int flags) const { - auto data = setupMapInt(flags); + auto newData = setupMapInt(flags); // NOLINTNEXTLINE(performance-no-int-to-ptr) - if (data == MAP_FAILED) { + if (newData == MAP_FAILED) { throw SystemExceptionOn("mmap(2) failed", strerror(errno), errno, path); } - return data; + return newData; } } -- cgit v1.2.3