From c5116a0545065d397771c3eb07876fb1cb67c61c Mon Sep 17 00:00:00 2001 From: crueter Date: Fri, 14 Nov 2025 22:03:38 -0500 Subject: [PATCH] std:;string Signed-off-by: crueter --- src/common/logging/backend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index f471fe9341..49f13fc21f 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -112,7 +112,7 @@ public: // This must be a static otherwise it would get checked on EVERY // instance of logging an entry... static std::string username = []() -> std::string { - auto* s = getenv("USER"); + const char* s = getenv("USER"); if (s == nullptr) s = getenv("USERNAME"); @@ -120,7 +120,7 @@ public: s = getenv("LOGNAME"); if (s == nullptr) - return ""; + return std::string{}; return std::string{s}; }();