Skip to content

Commit

Permalink
Fix reporting of log rotation status (#862)
Browse files Browse the repository at this point in the history
Accidental use of comparison operator when an assignment was needed

Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass authored Nov 11, 2024
1 parent e29e529 commit af3d08e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ocpp/common/ocpp_logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ LogRotationStatus MessageLogging::rotate_log(const std::string& file_basename) {
std::filesystem::rename(file, new_file_name);
EVLOG_info << "Renaming: " << file.string() << " -> " << new_file_name.string();
if (status == LogRotationStatus::NotRotated) {
status == LogRotationStatus::Rotated;
status = LogRotationStatus::Rotated;
}
} else {
// try parsing the .x extension and log an error if this was not possible
Expand All @@ -210,7 +210,7 @@ LogRotationStatus MessageLogging::rotate_log(const std::string& file_basename) {
EVLOG_info << "Renaming: " << file.string() << " -> " << new_file_name.string();
std::filesystem::rename(file, new_file_name);
if (status == LogRotationStatus::NotRotated) {
status == LogRotationStatus::Rotated;
status = LogRotationStatus::Rotated;
}
}

Expand Down

0 comments on commit af3d08e

Please sign in to comment.