summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-07-31 19:08:38 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-07-31 19:08:38 +0100
commitd7c4ec4287594756a11b98ab73b4663741b5ad2a (patch)
tree2afef826d7488c94f1488b1fae42232552050ca1
parentEnable all cppcheck checks and fixup (diff)
downloadlibadhocutil-d7c4ec4287594756a11b98ab73b4663741b5ad2a.tar.bz2
libadhocutil-d7c4ec4287594756a11b98ab73b4663741b5ad2a.tar.xz
libadhocutil-d7c4ec4287594756a11b98ab73b4663741b5ad2a.zip
Fix shadowinglibadhocutil-0.9.1
-rw-r--r--libadhocutil/fileUtils.cpp12
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;
}
}