[lttng-dev] [PATCH lttng-tools 1/2] Fix: uninitialized return value

Jérémie Galarneau jeremie.galarneau at efficios.com
Mon Jan 26 11:03:09 EST 2015


Both patches were merged all the way back to 2.4.

Thanks!
Jérémie

On Fri, Jan 23, 2015 at 11:28 AM, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
>  src/bin/lttng-sessiond/ust-app.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c
> index 41a6d39..bdee8e6 100644
> --- a/src/bin/lttng-sessiond/ust-app.c
> +++ b/src/bin/lttng-sessiond/ust-app.c
> @@ -4132,7 +4132,7 @@ static
>  int ust_app_flush_session(struct ltt_ust_session *usess)
>
>  {
> -       int ret;
> +       int ret = 0;
>
>         DBG("Flushing session buffers for all ust apps");
>
> @@ -4173,7 +4173,6 @@ int ust_app_flush_session(struct ltt_ust_session *usess)
>                         /* Push metadata. */
>                         (void) push_metadata(ust_session_reg, usess->consumer);
>                 }
> -               ret = 0;
>                 break;
>         }
>         case LTTNG_BUFFER_PER_PID:
> @@ -4192,6 +4191,7 @@ int ust_app_flush_session(struct ltt_ust_session *usess)
>                 break;
>         }
>         default:
> +               ret = -1;
>                 assert(0);
>                 break;
>         }
> --
> 2.1.1
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list