Clean-up: kernel-consumer: fix -Wshadow issues in lttng_kconsumer_recv_cmd
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 31 Mar 2021 15:10:30 +0000 (11:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Apr 2021 20:21:33 +0000 (16:21 -0400)
There is a "ret" variable declared at the top and used throughout, but
there are also some other "ret" variables declared in narrower scopes.

Most of the time, the return value is not communicated from the "case"s
to the return value of the function. On failure, they goto an error
label which overrides ret to -1. There is one exception in "case
LTTNG_CONSUMER_ADD_STREAM", which goes directly to label end, not sure
if that's on purpose or not.

So what I did is: declare variables in narrower scopes when possible,
name them according to their intended use (e.g. ret_send, ret_recv). In
the end, there is no variable simply named "ret". The variable holding
the function's return value is "ret_func".

Change-Id: Ic02067c23757bd98d4b2d3d0f2b77384b4b0d743
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.025863 seconds and 4 git commands to generate.