Clean-up: common: error_log_time doesn't need to be global
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Apr 2023 18:25:47 +0000 (14:25 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Apr 2023 14:36:27 +0000 (10:36 -0400)
error_log_time is only used in error.cpp. Reduce its visibility to the
file.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifbd821af12d7378b203cd7a2c1d48d28ed00cb40

src/common/error.cpp
src/common/error.hpp

index 1bf9491c27d8c8295716722c63e3e9ccd59e86dd..0bb088066466cb1ea331e849305ed783cdd990fc 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+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()
index 885902bb9d19f7be22779f5c58f76f6302f7f2c7..7ce643411c8fd7567fd53e0dab26a1c87866b6c8 100644 (file)
@@ -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;
This page took 0.026189 seconds and 4 git commands to generate.