From: Martin Townsend Date: Wed, 9 Jul 2014 20:46:54 +0000 (-0400) Subject: Fix: add missing URCU_TLS to logging time variable X-Git-Tag: v2.5.0~28 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=46d7c5741f9ffb84e5668ebdb6ec9914993454e1;p=lttng-tools.git Fix: add missing URCU_TLS to logging time variable Signed-off-by: David Goulet --- diff --git a/src/common/error.c b/src/common/error.c index 418fc47ab..5abb7453a 100644 --- a/src/common/error.c +++ b/src/common/error.c @@ -49,14 +49,14 @@ const char *log_add_time(void) } /* Format time in the TLS variable. */ - ret = snprintf(error_log_time.str, sizeof(error_log_time.str), + ret = snprintf(URCU_TLS(error_log_time).str, sizeof(error_log_time.str), "%02d:%02d:%02d.%06ld", tm.tm_hour, tm.tm_min, tm.tm_sec, tp.tv_nsec); if (ret < 0) { goto error; } - return error_log_time.str; + return URCU_TLS(error_log_time).str; error: /* Return an empty string on error so logging is not affected. */