mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Mattias Jacobsson <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: sansharm@redhat.com, jolsa@kernel.org, hpa@zytor.com,
	mingo@kernel.org, 2pi@mok.nu, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, acme@redhat.com,
	peterz@infradead.org
Subject: [tip:perf/urgent] perf strbuf: Remove redundant va_end() in strbuf_addv()
Date: Tue, 8 Jan 2019 07:44:51 -0800	[thread overview]
Message-ID: <tip-099be748865eece21362aee416c350c0b1ae34df@git.kernel.org> (raw)
In-Reply-To: <20181229141750.16945-1-2pi@mok.nu>

Commit-ID:  099be748865eece21362aee416c350c0b1ae34df
Gitweb:     https://git.kernel.org/tip/099be748865eece21362aee416c350c0b1ae34df
Author:     Mattias Jacobsson <2pi@mok.nu>
AuthorDate: Sat, 29 Dec 2018 15:17:50 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 4 Jan 2019 12:54:49 -0300

perf strbuf: Remove redundant va_end() in strbuf_addv()

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().

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sanskriti Sharma <sansharm@redhat.com>
Link: http://lkml.kernel.org/r/20181229141750.16945-1-2pi@mok.nu
Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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);

      parent reply	other threads:[~2019-01-08 15:45 UTC|newest]

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

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=tip-099be748865eece21362aee416c350c0b1ae34df@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=2pi@mok.nu \
    --cc=acme@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sansharm@redhat.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome