lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210412092054.28117-1-wanjiabing@vivo.com>
Date:   Mon, 12 Apr 2021 17:20:48 +0800
From:   Wan Jiabing <wanjiabing@...o.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        Colin Ian King <colin.king@...onical.com>,
        Wan Jiabing <wanjiabing@...o.com>, linux-kernel@...r.kernel.org
Cc:     kael_w@...h.net
Subject: [PATCH] perf: bench: Remove unneeded variable

Fix coccicheck warning:

tools/perf/bench/find-bit-bench.c:123:5-8:
Unneeded variable: "err". Return "0" on line 134

Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
---
 tools/perf/bench/find-bit-bench.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/bench/find-bit-bench.c b/tools/perf/bench/find-bit-bench.c
index 73b5bcc5946a..7e748a56a8ba 100644
--- a/tools/perf/bench/find-bit-bench.c
+++ b/tools/perf/bench/find-bit-bench.c
@@ -120,7 +120,7 @@ static int do_for_each_set_bit(unsigned int num_bits)
 
 int bench_mem_find_bit(int argc, const char **argv)
 {
-	int err = 0, i;
+	int i;
 
 	argc = parse_options(argc, argv, options, bench_usage, 0);
 	if (argc) {
@@ -131,5 +131,5 @@ int bench_mem_find_bit(int argc, const char **argv)
 	for (i = 1; i <= 2048; i <<= 1)
 		do_for_each_set_bit(i);
 
-	return err;
+	return 0;
 }
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ