From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: [PATCH 1/4] libtraceevent: Only add space on log prints if perror is used
Date: Tue, 15 Feb 2022 22:13:42 -0500 [thread overview]
Message-ID: <20220216031345.984113-2-rostedt@goodmis.org> (raw)
In-Reply-To: <20220216031345.984113-1-rostedt@goodmis.org>
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Do not add the space is the perror is not printed, as the space was only
to separate the perror output from the rest of the output.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
src/parse-utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/parse-utils.c b/src/parse-utils.c
index 89bf1cd92273..3f4918f7468e 100644
--- a/src/parse-utils.c
+++ b/src/parse-utils.c
@@ -68,10 +68,10 @@ int __tep_vprint(const char *name, enum tep_loglevel level,
{
int ret = errno;
- if (errno && print_err)
+ if (errno && print_err) {
perror(name);
-
- fprintf(stderr, " ");
+ fprintf(stderr, " ");
+ }
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
--
2.34.1
next prev parent reply other threads:[~2022-02-16 3:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 3:13 [PATCH 0/4] libtraceevent: Clean up printing and man pages Steven Rostedt
2022-02-16 3:13 ` Steven Rostedt [this message]
2022-02-16 3:13 ` [PATCH 2/4] libtraceevent: Have logs only print to stderr on WARNING or higher Steven Rostedt
2022-02-16 3:13 ` [PATCH 3/4] libtraceevent: Add API tep_get_function_count() Steven Rostedt
2022-02-16 3:13 ` [PATCH 4/4] libtraceevent: Make functions bold in man pages Steven Rostedt
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=20220216031345.984113-2-rostedt@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/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).