From f7eede23de6f78b2b33b477b2b4c5451141825d5 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 2 Oct 2024 19:51:41 -0500 Subject: Add setup for coverage and cppcheck. --- source/fud_directory.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/fud_directory.cpp') 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 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, 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; -- cgit v1.2.3