Fix: cppcheck linter cleanups
[lttng-tools.git] / src / bin / lttng-sessiond / trace-ust.c
index 1fda555ea0e987bdcc11565b43ffea84b1d85765..3d9390db22395885cc1f62e62c90bf9167040b93 100644 (file)
@@ -183,7 +183,6 @@ error:
 struct ltt_ust_session *trace_ust_create_session(char *path,
                unsigned int session_id, struct lttng_domain *domain)
 {
 struct ltt_ust_session *trace_ust_create_session(char *path,
                unsigned int session_id, struct lttng_domain *domain)
 {
-       int ret;
        struct ltt_ust_session *lus;
 
        /* Allocate a new ltt ust session */
        struct ltt_ust_session *lus;
 
        /* Allocate a new ltt ust session */
@@ -219,6 +218,8 @@ struct ltt_ust_session *trace_ust_create_session(char *path,
 
        /* Use the default consumer output which is the tracing session path. */
        if (path && strlen(path) > 0) {
 
        /* Use the default consumer output which is the tracing session path. */
        if (path && strlen(path) > 0) {
+               int ret;
+
                ret = snprintf(lus->consumer->dst.trace_path, PATH_MAX,
                                "%s" DEFAULT_UST_TRACE_DIR, path);
                if (ret < 0) {
                ret = snprintf(lus->consumer->dst.trace_path, PATH_MAX,
                                "%s" DEFAULT_UST_TRACE_DIR, path);
                if (ret < 0) {
This page took 0.023587 seconds and 4 git commands to generate.