aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2022-02-15 22:13:42 -0500
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-02-19 16:34:32 -0500
commit743edccb47ec662c18d1793a11906d2bd46660c0 (patch)
tree5b71b98054be8757e301629b2c92423eef7bb537
parentcc7e61b351a532838b1e40010f7e93b66ef7d0f5 (diff)
downloadlibtraceevent-743edccb47ec662c18d1793a11906d2bd46660c0.tar.gz
libtraceevent: Only add space on log prints if perror is used
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. Link: https://lore.kernel.org/linux-trace-devel/20220216031345.984113-2-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--src/parse-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse-utils.c b/src/parse-utils.c
index 89bf1cd..3f4918f 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");