From: Jérémie Galarneau Date: Mon, 17 Apr 2023 18:25:47 +0000 (-0400) Subject: Clean-up: common: error_log_time doesn't need to be global X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1944cedb180887d9dfe0906f930df167e714af99;p=lttng-tools.git Clean-up: common: error_log_time doesn't need to be global error_log_time is only used in error.cpp. Reduce its visibility to the file. Signed-off-by: Jérémie Galarneau Change-Id: Ifbd821af12d7378b203cd7a2c1d48d28ed00cb40 --- diff --git a/src/common/error.cpp b/src/common/error.cpp index 1bf9491c2..0bb088066 100644 --- a/src/common/error.cpp +++ b/src/common/error.cpp @@ -20,14 +20,17 @@ #include #include +namespace { /* * lttng_opt_abort_on_error: unset: -1, disabled: 0, enabled: 1. * Controlled by the LTTNG_ABORT_ON_ERROR environment variable. */ -static int lttng_opt_abort_on_error = -1; +int lttng_opt_abort_on_error = -1; /* TLS variable that contains the time of one single log entry. */ DEFINE_URCU_TLS(struct log_time, error_log_time); +} /* namespace */ + DEFINE_URCU_TLS(const char *, logger_thread_name); const char *log_add_time() diff --git a/src/common/error.hpp b/src/common/error.hpp index 885902bb9..7ce643411 100644 --- a/src/common/error.hpp +++ b/src/common/error.hpp @@ -46,7 +46,6 @@ struct log_time { /* Format: 00:00:00.000000000 plus NULL byte. */ char str[19]; }; -extern LTTNG_EXPORT DECLARE_URCU_TLS(struct log_time, error_log_time); extern DECLARE_URCU_TLS(const char *, logger_thread_name); extern int lttng_opt_quiet;