[PATCH 1/4] libtraceevent: Only add space on log prints if perror is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux