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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <475df60d9dd518e20ae9df396c60b69b@208suo.com>
Date:   Wed, 14 Jun 2023 11:38:41 +0800
From:   baomingtong001@...suo.com
To:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, namhyung@...nel.org, irogers@...gle.com,
        adrian.hunter@...el.com
Cc:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] perf bench: remove unneeded variable

fix the following coccicheck warning:

tools/perf/bench/find-bit-bench.c:127:5-8: Unneeded variable: "err". 
Return "0".

Signed-off-by: Mingtong Bao <baomingtong001@...suo.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 7e25b0e413f6..70619bc73841 100644
--- a/tools/perf/bench/find-bit-bench.c
+++ b/tools/perf/bench/find-bit-bench.c
@@ -124,7 +124,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) {
@@ -135,5 +135,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;
  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ