From: Simon Marchi Date: Wed, 31 Mar 2021 19:06:34 +0000 (-0400) Subject: Fix: sessiond: fix -Wshadow error in save.c X-Git-Tag: v2.13.0-rc1~122 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=997a03aacc9c43aaa4c2d8ca68a0337300891077;p=lttng-tools.git Fix: sessiond: fix -Wshadow error in save.c I think this actually fixes a bug. Because of the second ret variable, the return value from init_ust_event_from_agent_event or save_ust_event would not be forwarded correctly, in case of error. Change-Id: I6aad9e36f31ae5abf8ef487680af7c79853ffa3b Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index c9bed2e20..249d30302 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -1240,7 +1240,6 @@ int save_agent_events(struct config_writer *writer, rcu_read_lock(); cds_lfht_for_each_entry(agent->events->ht, &iter.iter, node, node) { - int ret; struct agent_event *agent_event; struct ltt_ust_event fake_event;