summaryrefslogtreecommitdiff
path: root/source/fud_directory.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-02 19:51:41 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-02 19:51:41 -0500
commitf7eede23de6f78b2b33b477b2b4c5451141825d5 (patch)
treed698a92272b8e4a8428b82d9a21f3e98ed267a6d /source/fud_directory.cpp
parent32c722d50943bbdeba65a77d5e94f8692cf75f3c (diff)
Add setup for coverage and cppcheck.
Diffstat (limited to 'source/fud_directory.cpp')
-rw-r--r--source/fud_directory.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/fud_directory.cpp b/source/fud_directory.cpp
index 6851158..5772c95 100644
--- a/source/fud_directory.cpp
+++ b/source/fud_directory.cpp
@@ -137,15 +137,15 @@ Result<DirectoryEntry, FudStatus> Directory::info()
return RetType::error(m_status);
}
- Stat statBuffer{};
- auto status = fstat(m_dirFd, &statBuffer);
- if (status == -1) {
+ Stat sBuffer{};
+ auto fStatus = fstat(m_dirFd, &sBuffer);
+ if (fStatus == -1) {
m_errorCode = errno;
m_status = FudStatus::Failure;
return RetType::error(m_status);
}
- auto retValue = DirectoryEntry::fromStat(m_name, statBuffer);
+ auto retValue = DirectoryEntry::fromStat(m_name, sBuffer);
if (retValue.isOkay()) {
m_errorCode = 0;
@@ -187,17 +187,17 @@ Result<std::optional<DirectoryEntry>, FudStatus> Directory::getNextEntry()
m_errorCode = 0;
- Stat statBuffer{};
+ Stat sBuffer{};
auto flags = 0;
- auto status = fstatat(m_dirFd, entryNameCString, &statBuffer, flags);
- if (status == -1) {
+ auto fStatus = fstatat(m_dirFd, entryNameCString, &sBuffer, flags);
+ if (fStatus == -1) {
m_errorCode = errno;
m_status = FudStatus::Failure;
return RetType::error(m_status);
}
auto entryName = String{entryNameCString};
- auto retValue = DirectoryEntry::fromStat(entryName, statBuffer);
+ auto retValue = DirectoryEntry::fromStat(entryName, sBuffer);
if (retValue.isOkay()) {
m_errorCode = 0;