diff options
Diffstat (limited to 'redfish-core/include/gzfile.hpp')
-rw-r--r-- | redfish-core/include/gzfile.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp index 2001756a74..567741dfd8 100644 --- a/redfish-core/include/gzfile.hpp +++ b/redfish-core/include/gzfile.hpp @@ -13,7 +13,7 @@ class GzFileReader std::vector<std::string>& logEntries, size_t& logCount) { gzFile logStream = gzopen(filename.c_str(), "r"); - if (!logStream) + if (logStream == nullptr) { BMCWEB_LOG_ERROR << "Can't open gz file: " << filename << '\n'; return false; @@ -71,7 +71,7 @@ class GzFileReader BMCWEB_LOG_ERROR << "Error occurs during parsing host log.\n"; return false; } - } while (!gzeof(logStream)); + } while (gzeof(logStream) != 1); return true; } |