Move init_usterr() to snprintf, along with its ust_loglevel state.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
static CDS_LIST_HEAD(lttng_transport_list);
-void init_usterr(void)
-{
- char *ust_debug;
-
- if (ust_loglevel == UST_LOGLEVEL_UNKNOWN) {
- ust_debug = getenv("LTTNG_UST_DEBUG");
- if (ust_debug)
- ust_loglevel = UST_LOGLEVEL_DEBUG;
- else
- ust_loglevel = UST_LOGLEVEL_NORMAL;
- }
-}
-
struct lttng_transport *lttng_transport_find(const char *name)
{
struct lttng_transport *transport;
#include <usterr-signal-safe.h>
volatile enum ust_loglevel ust_loglevel;
+
+void init_usterr(void)
+{
+ char *ust_debug;
+
+ if (ust_loglevel == UST_LOGLEVEL_UNKNOWN) {
+ ust_debug = getenv("LTTNG_UST_DEBUG");
+ if (ust_debug)
+ ust_loglevel = UST_LOGLEVEL_DEBUG;
+ else
+ ust_loglevel = UST_LOGLEVEL_NORMAL;
+ }
+}