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]
Message-ID: <alpine.LFD.1.00.0802101056530.2896@woody.linux-foundation.org>
Date:	Sun, 10 Feb 2008 10:58:02 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	S.Çağlar Onur <caglar@...dus.org.tr>
cc:	Richard Knutsson <ricknu-0@...dent.ltu.se>,
	linux-kernel@...r.kernel.org, davem@...emloft.net,
	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.)



On Sun, 10 Feb 2008, S.Çağlar Onur wrote:
> > >
> > > -	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))) {

Yes indeed. I hate the idiotic "double parenthesis without any meaning". 
I'd much rather see "((..) != NULL)" than "((..))", because the latter is 
totally meaningless semantically (although gcc gives it semantics).

		Linus
--
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