Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools] Clean-up: Remove double buffer initialisation
Date: Thu, 25 Apr 2019 14:23:34 -0400	[thread overview]
Message-ID: <20190425182333.GA4708@gmail.com> (raw)
In-Reply-To: <20190328190743.4146-1-ylamarre@efficios.com>

Merged in master and stable-2.11.

Thanks!
J?r?mie

On Thu, Mar 28, 2019 at 03:07:43PM -0400, Yannick Lamarre wrote:
> Signed-off-by: Yannick Lamarre <ylamarre at efficios.com>
> ---
>  src/lib/lttng-ctl/lttng-ctl.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c
> index 165fef4d..92634c00 100644
> --- a/src/lib/lttng-ctl/lttng-ctl.c
> +++ b/src/lib/lttng-ctl/lttng-ctl.c
> @@ -1078,7 +1078,11 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle,
>  	unsigned int free_filter_expression = 0;
>  	struct filter_parser_ctx *ctx = NULL;
>  
> -	memset(&send_buffer, 0, sizeof(send_buffer));
> +	/*
> +	 * We have either a filter or some exclusions, so we need to set up
> +	 * a variable-length memory block from where to send the data.
> +	 */
> +	lttng_dynamic_buffer_init(&send_buffer);
>  
>  	/*
>  	 * Cast as non-const since we may replace the filter expression
> @@ -1128,12 +1132,6 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle,
>  	lsm.u.enable.exclusion_count = exclusion_count;
>  	lsm.u.enable.bytecode_len = 0;
>  
> -	/*
> -	 * We have either a filter or some exclusions, so we need to set up
> -	 * a variable-length memory block from where to send the data.
> -	 */
> -	lttng_dynamic_buffer_init(&send_buffer);
> -
>  	/* Parse filter expression. */
>  	if (filter_expression != NULL || handle->domain.type == LTTNG_DOMAIN_JUL
>  			|| handle->domain.type == LTTNG_DOMAIN_LOG4J
> -- 
> 2.11.0
> 


           reply	other threads:[~2019-04-25 18:23 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20190328190743.4146-1-ylamarre@efficios.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190425182333.GA4708@gmail.com \
    --to=jeremie.galarneau@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox