Clean-up: lttng: fix -Wshadow error in lttng_session_descriptor
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 31 Mar 2021 18:55:41 +0000 (14:55 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Apr 2021 20:22:13 +0000 (16:22 -0400)
... by moving variable declaractions to narrower scopes.

Change-Id: I2ae3586596f543706b8e2ee5c7d4ce52e0658a9e
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/create.c

index 22d1790f726f6fed25df5f7d43082fe81d3e034e..677c17329070276f6530139f315c1e17409ff0f5 100644 (file)
@@ -132,7 +132,6 @@ end:
 static
 struct lttng_session_descriptor *create_session_descriptor(void)
 {
-       int ret;
        ssize_t uri_count;
        enum output_type output_type;
        struct lttng_uri *uris = NULL;
@@ -144,6 +143,7 @@ struct lttng_session_descriptor *create_session_descriptor(void)
                output_type = OUTPUT_NONE;
        } else if (opt_output_path) {
                char *expanded_output_path;
+               int ret;
 
                output_type = OUTPUT_LOCAL;
                expanded_output_path = utils_expand_path(opt_output_path);
@@ -160,6 +160,8 @@ struct lttng_session_descriptor *create_session_descriptor(void)
                        goto end;
                }
        } else if (opt_url || opt_ctrl_url) {
+               int ret;
+
                uri_str1 = opt_ctrl_url ? opt_ctrl_url : opt_url;
                uri_str2 = opt_data_url;
 
This page took 0.026896 seconds and 4 git commands to generate.