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:
 <VI1PR02MB3952FA1785356790D290CE949C1AA@VI1PR02MB3952.eurprd02.prod.outlook.com>
Date: Tue, 30 Sep 2025 10:25:37 +0000
From: David Binderman <dcb314@...mail.com>
To: "mcgrof@...nel.org" <mcgrof@...nel.org>, "petr.pavlu@...e.com"
	<petr.pavlu@...e.com>, "da.gomez@...nel.org" <da.gomez@...nel.org>,
	"samitolvanen@...gle.com" <samitolvanen@...gle.com>,
	"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>, LKML
	<linux-kernel@...r.kernel.org>
Subject: linux-6.17/kernel/module/sysfs.c:275: Always true test in for loop ?

Hello there,

Static analyser cppcheck says:

linux-6.17/kernel/module/sysfs.c:275:20: style: Pointer expression 'attr=&mod->modinfo_attrs[i]' converted to bool is always true. [knownPointerToBool]

Source code is

    for (i = 0; (attr = &mod->modinfo_attrs[i]); i++) {

Suggest code rework.

Regards

David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ