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-prev] [day] [month] [year] [list]
Date:	Tue, 3 Mar 2009 22:13:06 +0200
From:	Riku Voipio <riku.voipio@....fi>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	Roland Dreier <rdreier@...co.com>, rpurdie@...ys.net,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] leds: Fix &&/|| confusion

On Fri, Feb 06, 2009 at 07:51:13PM +0100, Roel Kluin wrote:
> Roland Dreier wrote:
> >  > -	if (type != EV_SND && (code != SND_BELL || code != SND_TONE))
> >  > +	if (type != EV_SND && (code != SND_BELL && code != SND_TONE))
> > 
> > Actually more likely seems to be
> > 
> > 	if (type != EV_SND || (code != SND_BELL && code != SND_TONE))
> 
> Thanks for your review,

I think what I want is:

	if (!(type==EV_SND && (code == SND_BELL || code == SND_TONE)))

Not that I think anyone would send SND_* without EV_SND.

From 725c752a53a83319042dcdaccf072908b29d1c40 Mon Sep 17 00:00:00 2001
From: Riku Voipio <riku.voipio@....fi>
Date: Tue, 3 Mar 2009 22:06:51 +0200
Subject: [PATCH 19/19] [PATCH v2] leds: Fix &&/|| confusion

Thanks to Roel Kluin <roel.kluin@...il.com> for noticing.

Signed-off-by: Riku Voipio <riku.voipio@....fi>
---
 drivers/leds/leds-pca9532.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
index a46d208..dba8921 100644
--- a/drivers/leds/leds-pca9532.c
+++ b/drivers/leds/leds-pca9532.c
@@ -169,7 +169,7 @@ static int pca9532_event(struct input_dev *dev, unsigned int type,
 {
 	struct pca9532_data *data = input_get_drvdata(dev);
 
-	if (type != EV_SND && (code != SND_BELL || code != SND_TONE))
+	if (!(type == EV_SND && (code == SND_BELL || code == SND_TONE)))
 		return -1;
 
 	/* XXX: allow different kind of beeps with psc/pwm modifications */
-- 
1.6.1.3


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ