diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-02-15 22:13:42 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-02-19 16:34:32 -0500 |
commit | 743edccb47ec662c18d1793a11906d2bd46660c0 (patch) | |
tree | 5b71b98054be8757e301629b2c92423eef7bb537 | |
parent | cc7e61b351a532838b1e40010f7e93b66ef7d0f5 (diff) | |
download | libtraceevent-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.c | 6 |
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"); |