Clean-up: kernel-consumer: fix -Wshadow issues in lttng_kconsumer_recv_cmd
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>
This page took 0.0285 seconds and 4 git commands to generate.