All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH lttng-tools] Initialize ret to zero
       [not found] <20180430182735.12118-1-jonathan.rajotte-julien@efficios.com>
@ 2018-05-02 14:25 ` Jérémie Galarneau
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2018-05-02 14:25 UTC (permalink / raw)
  To: Jonathan Rajotte; +Cc: lttng-dev, Jeremie Galarneau


[-- Attachment #1.1: Type: text/plain, Size: 1247 bytes --]

Merged, thanks!

Jérémie

On 30 April 2018 at 14:27, Jonathan Rajotte <
jonathan.rajotte-julien@efficios.com> wrote:

> sample_channel_positions return garbage if cds_lfht_is_node_deleted(&
> stream->node.node)
> on first and "possibly" only iteration of the
> consumer_data.stream_per_chan_id_ht
> hash table.
>
> Found by scan-build
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
>  src/common/consumer/consumer-timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/common/consumer/consumer-timer.c b/src/common/consumer/
> consumer-timer.c
> index 721f146e..38b8b30d 100644
> --- a/src/common/consumer/consumer-timer.c
> +++ b/src/common/consumer/consumer-timer.c
> @@ -637,7 +637,7 @@ int sample_channel_positions(struct
> lttng_consumer_channel *channel,
>                 sample_positions_cb sample, get_consumed_cb get_consumed,
>                 get_produced_cb get_produced)
>  {
> -       int ret;
> +       int ret = 0;
>         struct lttng_ht_iter iter;
>         struct lttng_consumer_stream *stream;
>         bool empty_channel = true;
> --
> 2.17.0
>
>


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

[-- Attachment #1.2: Type: text/html, Size: 1979 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH lttng-tools] Initialize ret to zero
@ 2018-04-30 18:27 Jonathan Rajotte
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Rajotte @ 2018-04-30 18:27 UTC (permalink / raw)
  To: lttng-dev; +Cc: jgalar

sample_channel_positions return garbage if cds_lfht_is_node_deleted(&stream->node.node)
on first and "possibly" only iteration of the consumer_data.stream_per_chan_id_ht
hash table.

Found by scan-build

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
 src/common/consumer/consumer-timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/consumer/consumer-timer.c b/src/common/consumer/consumer-timer.c
index 721f146e..38b8b30d 100644
--- a/src/common/consumer/consumer-timer.c
+++ b/src/common/consumer/consumer-timer.c
@@ -637,7 +637,7 @@ int sample_channel_positions(struct lttng_consumer_channel *channel,
 		sample_positions_cb sample, get_consumed_cb get_consumed,
 		get_produced_cb get_produced)
 {
-	int ret;
+	int ret = 0;
 	struct lttng_ht_iter iter;
 	struct lttng_consumer_stream *stream;
 	bool empty_channel = true;
-- 
2.17.0

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-02 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180430182735.12118-1-jonathan.rajotte-julien@efficios.com>
2018-05-02 14:25 ` [PATCH lttng-tools] Initialize ret to zero Jérémie Galarneau
2018-04-30 18:27 Jonathan Rajotte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.