From e2fc8e9d0b5f237c0f925c68301988ed04a68131 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 31 Mar 2021 14:51:12 -0400 Subject: [PATCH] Clean-up: liblttng-ctl: fix -Wshadow error in lttng_enable_event_with_exclusions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The local variable `handle` shadows the parameter, rename the local variable. Change-Id: Ic1f3b8ae9fd6ac356eeee691c0328d6e8e1d0216 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- src/lib/lttng-ctl/lttng-ctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 6deab7848..29ebe9c9e 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -1270,15 +1270,15 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle, assert(fd_count == 0 || fd_count == 1); if (fd_count == 1) { - struct fd_handle *handle = + struct fd_handle *h = lttng_payload_view_pop_fd_handle(&view); - if (!handle) { + if (!h) { goto mem_error; } - fd_to_send = fd_handle_get_fd(handle); - fd_handle_put(handle); + fd_to_send = fd_handle_get_fd(h); + fd_handle_put(h); } ret = lttng_ctl_ask_sessiond_fds_varlen(&lsm, -- 2.34.1