linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Mattias Jacobsson <2pi@mok.nu>
Cc: peterz@infradead.org, mingo@redhat.com, sansharm@redhat.com,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH] perf tools: util: remove redundant va_end() in strbuf_addv()
Date: Fri, 4 Jan 2019 12:48:46 -0300	[thread overview]
Message-ID: <20190104154846.GC9833@kernel.org> (raw)
In-Reply-To: <20181229141750.16945-1-2pi@mok.nu>

Em Sat, Dec 29, 2018 at 03:17:50PM +0100, Mattias Jacobsson escreveu:
> Each call to va_copy() should have one, and only one, corresponding call
> to va_end(). In strbuf_addv() some code paths result in va_end() getting
> called multiple times. Remove the superfluous va_end().
> 
> Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end")
> Signed-off-by: Mattias Jacobsson <2pi@mok.nu>

Its nice that you included the Fixes tag!

Thanks, applied.

- Arnaldo

> ---
>  tools/perf/util/strbuf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c
> index 9005fbe0780e..23092fd6451d 100644
> --- a/tools/perf/util/strbuf.c
> +++ b/tools/perf/util/strbuf.c
> @@ -109,7 +109,6 @@ static int strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap)
>  			return ret;
>  		}
>  		len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap_saved);
> -		va_end(ap_saved);
>  		if (len > strbuf_avail(sb)) {
>  			pr_debug("this should not happen, your vsnprintf is broken");
>  			va_end(ap_saved);
> -- 
> 2.20.1

-- 

- Arnaldo

  reply	other threads:[~2019-01-04 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29 14:17 [PATCH] perf tools: util: remove redundant va_end() in strbuf_addv() Mattias Jacobsson
2019-01-04 15:48 ` Arnaldo Carvalho de Melo [this message]
2019-01-08 15:44 ` [tip:perf/urgent] perf strbuf: Remove " tip-bot for Mattias Jacobsson

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=20190104154846.GC9833@kernel.org \
    --to=acme@kernel.org \
    --cc=2pi@mok.nu \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sansharm@redhat.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;
as well as URLs for NNTP newsgroup(s).