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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c519982c1b73dfb4aa84c8215c8a5ac@208suo.com>
Date:   Wed, 14 Jun 2023 15:14:09 +0800
From:   baomingtong001@...suo.com
To:     terrelln@...com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] lib: zstd: remove unneeded variable

fix the following coccicheck warning:

lib/zstd/compress/zstd_cwksp.h:220:17-27: Unneeded variable: 
"slackSpace". Return "ZSTD_CWKSP_ALIGNMENT_BYTES".

Signed-off-by: Mingtong Bao <baomingtong001@...suo.com>
---
  lib/zstd/compress/zstd_cwksp.h | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/zstd/compress/zstd_cwksp.h 
b/lib/zstd/compress/zstd_cwksp.h
index 349fc923c355..36c574cd3d6f 100644
--- a/lib/zstd/compress/zstd_cwksp.h
+++ b/lib/zstd/compress/zstd_cwksp.h
@@ -217,8 +217,7 @@ MEM_STATIC size_t 
ZSTD_cwksp_slack_space_required(void) {
       * n_1 + n_2 == 64 bytes if the cwksp is freshly allocated, due to 
tables and
       * aligneds being sized in multiples of 64 bytes.
       */
-    size_t const slackSpace = ZSTD_CWKSP_ALIGNMENT_BYTES;
-    return slackSpace;
+    return ZSTD_CWKSP_ALIGNMENT_BYTES;
  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ