diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-07-31 19:08:38 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-07-31 19:08:38 +0100 |
commit | d7c4ec4287594756a11b98ab73b4663741b5ad2a (patch) | |
tree | 2afef826d7488c94f1488b1fae42232552050ca1 | |
parent | Enable all cppcheck checks and fixup (diff) | |
download | libadhocutil-d7c4ec4287594756a11b98ab73b4663741b5ad2a.tar.bz2 libadhocutil-d7c4ec4287594756a11b98ab73b4663741b5ad2a.tar.xz libadhocutil-d7c4ec4287594756a11b98ab73b4663741b5ad2a.zip |
Fix shadowinglibadhocutil-0.9.1
-rw-r--r-- | libadhocutil/fileUtils.cpp | 12 |
1 files 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; } } |