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]
Date:	Wed, 11 Nov 2015 13:19:23 +0000 (GMT)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Dave Penkler <dpenkler@...il.com>
cc:	gregkh@...uxfoundation.org, peter.chen@...escale.com,
	teuniz@...il.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, dpenkler@...il.com
Subject: [PATCH] fix compare_const_fl.cocci warnings

Move constants to the right of binary operators.

Semantic patch information:
 Depends on personal taste in some cases.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

CC: Dave Penkler <dpenkler@...il.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>

---

This is what Coccinelle generates.  But it would really be more normal in
the form !(x&y).

 usbtmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -494,7 +494,7 @@ static int usbtmc488_ioctl_simple(struct

 	dev = &data->intf->dev;

-	if (0 == (data->usb488_caps & USBTMC488_CAPABILITY_SIMPLE))
+	if ((data->usb488_caps & USBTMC488_CAPABILITY_SIMPLE) == 0)
 		return -EINVAL;

 	buffer = kmalloc(8, GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ