refactor: const correctness

Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
Samuel Gaist 2025-07-22 16:28:47 +02:00 committed by GitHub
parent 995aa0c582
commit 577ee7ffbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ void falco_logger::log(falco_logger::level priority, const std::string&& msg) {
}
} else {
const struct tm* ltm = std::localtime(&result);
static char format[] = "WWW MMM DD HH:mm:ss YYYY";
static const char format[] = "WWW MMM DD HH:mm:ss YYYY";
char tstr[sizeof(format)];
std::strftime(tstr, sizeof(tstr), format, ltm);
fprintf(stderr, "%s: %s", tstr, copy.c_str());