better naming

This commit is contained in:
Robin Müller 2023-02-18 13:46:51 +01:00
parent 3568bdbecf
commit 5f9eb01d94
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
UnixFileGuard::UnixFileGuard(const std::string& device, int& fileDescriptor, int flags,
std::string diagnosticPrefix)
: fileDescriptor(fileDescriptor) {
: cachedFd(fileDescriptor) {
fileDescriptor = open(device.c_str(), flags);
if (fileDescriptor < 0) {
#if FSFW_VERBOSE_LEVEL >= 1
@ -24,6 +24,6 @@ UnixFileGuard::UnixFileGuard(const std::string& device, int& fileDescriptor, int
}
}
UnixFileGuard::~UnixFileGuard() { close(fileDescriptor); }
UnixFileGuard::~UnixFileGuard() { close(cachedFd); }
ReturnValue_t UnixFileGuard::getOpenResult() const { return openStatus; }

View File

@ -31,7 +31,7 @@ class UnixFileGuard {
ReturnValue_t getOpenResult() const;
private:
int fileDescriptor = 0;
int cachedFd = 0;
ReturnValue_t openStatus = returnvalue::OK;
};