linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] libtraceevent: Fix bug in tep_print_event()
Date: Wed, 30 Jun 2021 11:06:35 -0400	[thread overview]
Message-ID: <20210630110635.57411548@oasis.local.home> (raw)
In-Reply-To: <20210630141913.20675-1-y.karadz@gmail.com>

On Wed, 30 Jun 2021 17:19:13 +0300
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:

> {
>  	struct print_event_type type;
> -	char *format = strdup(fmt);
> -	char *current = format;
> -	char *str = format;
> +	char *format, *current, *str;

Nit, but please keep the above each on a separate line.

	char *current;
	char *format;
	char *str;

I try to avoid having pointers on a single line, it's just easier to
manage when they are separate.

Thanks!

-- Steve

>  	int offset;
>  	va_list args;
>  	struct tep_event *event;
>  
> +	event = tep_find_event_by_record(tep, record);
> +	if (!event) {
> +		trace_seq_printf(s, "[UNKNOWN EVENT]");
> +		return;
> +	}
> +
> +	str = current = format = strdup(fmt);
>  	if (!format)
>  		return;

  reply	other threads:[~2021-06-30 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30 14:19 [PATCH] libtraceevent: Fix bug in tep_print_event() Yordan Karadzhov (VMware)
2021-06-30 15:06 ` Steven Rostedt [this message]
2021-06-30 18:37   ` Yordan Karadzhov (VMware)
2021-06-30 18:50     ` Steven Rostedt
2021-06-30 19:38       ` Yordan Karadzhov (VMware)

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=20210630110635.57411548@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.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).