]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Use scnprintf where applicable
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Mar 2012 15:29:29 +0000 (12:29 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Mar 2012 15:36:19 +0000 (12:36 -0300)
commitef4d3eccb6a6952f90f6b403eec262c6069ba843
tree2746465309fd16392ed7c6265dea53366c6e52c7
parent5fe588fb6aa86d91bf546940cf1b9c5856f2876d
perf tools: Use scnprintf where applicable

Several places were expecting that the value returned was the number of
characters printed, not what would be printed if there was space.

Fix it by using the scnprintf and vscnprintf variants we inherited from
the kernel sources.

Some corner cases where the number of printed characters were not
accounted were fixed too.

Reported-by: Anton Blanchard <anton@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/powerpc/util/header.c
tools/perf/arch/x86/util/header.c
tools/perf/util/color.c
tools/perf/util/header.c
tools/perf/util/hist.c
tools/perf/util/strbuf.c
tools/perf/util/ui/browsers/hists.c
tools/perf/util/ui/helpline.c