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: <20230208011226.81918-1-yang.lee@linux.alibaba.com>
Date:   Wed,  8 Feb 2023 09:12:26 +0800
From:   Yang Li <yang.lee@...ux.alibaba.com>
To:     richard.henderson@...aro.org
Cc:     ink@...assic.park.msu.ru, mattst88@...il.com,
        linux-alpha@...r.kernel.org, linux-kernel@...r.kernel.org,
        Yang Li <yang.lee@...ux.alibaba.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next] alpha: Fix warning comparing pointer to 0

./arch/alpha/kernel/smp.c:271:39-40: WARNING comparing pointer to 0

Avoid pointer type value compared with 0 to make code clear.

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3979
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
 arch/alpha/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 0ede4b044e86..3edf1e572d10 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -268,7 +268,7 @@ recv_secondary_console_msg(void)
 			memcpy(cp2, cp1, cnt);
 			cp2[cnt] = '\0';
 			
-			while ((cp2 = strchr(cp2, '\r')) != 0) {
+			while ((cp2 = strchr(cp2, '\r'))) {
 				*cp2 = ' ';
 				if (cp2[1] == '\n')
 					cp2[1] = ' ';
-- 
2.20.1.7.g153144c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ