perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed...
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 8 Mar 2021 14:17:51 +0000 (11:17 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:57:32 +0000 (10:57 +0200)
commit427c1eea3d3e3814b20bafe0bac50ffe48969ae4
tree72616ef6c79930390c3f2669adda99733be05eb9
parent7f8751b7bd008df556402ac8c781a4959ecc20c1
perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars

[ Upstream commit 210e4c89ef61432040c6cd828fefa441f4887186 ]

The 'ret' variable was initialized to zero but then it was not updated
from the fprintf() return, fix it.

Reported-by: Yang Li <yang.lee@linux.alibaba.com>
cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
cc: Ingo Molnar <mingo@redhat.com>
cc: Jiri Olsa <jolsa@redhat.com>
cc: Mark Rutland <mark.rutland@arm.com>
cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Fixes: 90f18e63fbd00513 ("perf symbols: List symbols in a dso in ascending name order")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/symbol_fprintf.c