[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1438215700-5530-2-git-send-email-andi@firstfloor.org>
Date: Wed, 29 Jul 2015 17:21:37 -0700
From: Andi Kleen <andi@...stfloor.org>
To: acme@...nel.org
Cc: jolsa@...nel.org, eranian@...gle.com, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 1/4] perf, tools: Do not include escape sequences in color_vfprintf return
From: Andi Kleen <ak@...ux.intel.com>
color_vprintf was including the length of the invisible escape
sequences in its return argument. Don't include them to make
the return value usable for indentation calculations.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
tools/perf/util/color.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c
index 55355b3..f3d1d6d 100644
--- a/tools/perf/util/color.c
+++ b/tools/perf/util/color.c
@@ -83,12 +83,12 @@ static int __color_vfprintf(FILE *fp, const char *color, const char *fmt,
}
if (perf_use_color_default && *color)
- r += fprintf(fp, "%s", color);
+ fprintf(fp, "%s", color);
r += vfprintf(fp, fmt, args);
if (perf_use_color_default && *color)
- r += fprintf(fp, "%s", PERF_COLOR_RESET);
+ fprintf(fp, "%s", PERF_COLOR_RESET);
if (trail)
- r += fprintf(fp, "%s", trail);
+ fprintf(fp, "%s", trail);
return r;
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists