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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 10 Feb 2008 16:21:21 +0200
From:	"S.Çağlar Onur" <caglar@...dus.org.tr>
To:	Richard Knutsson <ricknu-0@...dent.ltu.se>
Cc:	linux-kernel@...r.kernel.org, davem@...emloft.net,
	torvalds@...ux-foundation.org, hidave.darkstar@...il.com,
	marcel@...tmann.org
Subject: Re: [PATCH] Silent compiler warning introduced by acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)

Hi;

10 Şub 2008 Paz tarihinde, Richard Knutsson şunları yazmıştı: 
> S.Çağlar Onur wrote:
> > Hi;
> >
> > Following patch silents
> >
> > net/bluetooth/hci_sysfs.c: In function `del_conn':
> > net/bluetooth/hci_sysfs.c:339: warning: suggest parentheses around assignment used as truth value
> >
> > compiler warning introduced by commit acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)
> >
> > Signed-off-by: S.Çağlar Onur <caglar@...dus.org.tr>
> >
> >  net/bluetooth/hci_sysfs.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
> > index e13cf5e..d2d1e4f 100644
> > --- a/net/bluetooth/hci_sysfs.c
> > +++ b/net/bluetooth/hci_sysfs.c
> > @@ -336,7 +336,7 @@ static void del_conn(struct work_struct *work)
> >  	struct device *dev;
> >  	struct hci_conn *conn = container_of(work, struct hci_conn, work);
> >  
> > -	while (dev = device_find_child(&conn->dev, NULL, __match_tty)) {
> > +	while ((dev = device_find_child(&conn->dev, NULL, __match_tty)) != NULL) {
> >   
> Why do you need '!= NULL'?

I thought its more readable than

while ((dev = device_find_child(&conn->dev, NULL, __match_tty))) {

Cheers
-- 
S.Çağlar Onur <caglar@...dus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

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