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: <4ADDDC55.8020809@imap.cc>
Date:	Tue, 20 Oct 2009 17:50:45 +0200
From:	Tilman Schmidt <tilman@...p.cc>
To:	LKML <linux-kernel@...r.kernel.org>,
	Andy Whitcroft <apw@...onical.com>
Subject: checkpatch.pl false positive? "ERROR: do not use assignment in if
 condition"

The command
./scripts/checkpatch.pl -f drivers/isdn/gigaset/bas-gigaset.c 
produces a lot of "ERROR" messages like these:

ERROR: do not use assignment in if condition
#608: FILE: isdn/gigaset/bas-gigaset.c:608:
+       if ((ret = usb_submit_urb(ucs->urb_cmd_in, GFP_ATOMIC)) != 0) {

ERROR: do not use assignment in if condition
#745: FILE: isdn/gigaset/bas-gigaset.c:745:
+               if ((ucs->rcvbuf = kmalloc(l, GFP_ATOMIC)) == NULL) {

ERROR: do not use assignment in if condition
#753: FILE: isdn/gigaset/bas-gigaset.c:753:
+               if ((rc = atread_submit(cs, BAS_TIMEOUT)) < 0) {

As far as I can see there's nothing wrong with these lines. In particular,
I cannot find anything in Documentation/CodingStyle that would prohibit an
assignment inside an 'if' condition.

PS: I know the file has other problems. That's why I'm trying to
checkpatch it in the first place.

-- 
Tilman Schmidt                    E-Mail: tilman@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


Download attachment "signature.asc" of type "application/pgp-signature" (255 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ