LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "S.Çağlar Onur" <caglar@pardus.org.tr>
Cc: Richard Knutsson <ricknu-0@student.ltu.se>,
	linux-kernel@vger.kernel.org, davem@davemloft.net,
	hidave.darkstar@gmail.com, marcel@holtmann.org
Subject: Re: [PATCH] Silent compiler warning introduced by acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)
Date: Sun, 10 Feb 2008 10:58:02 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802101056530.2896@woody.linux-foundation.org> (raw)
In-Reply-To: <200802101621.26432.caglar@pardus.org.tr>



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

  reply	other threads:[~2008-02-10 18:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-10  2:57 S.Çağlar Onur
2008-02-10  9:52 ` Richard Knutsson
2008-02-10 14:21   ` S.Çağlar Onur
2008-02-10 18:58     ` Linus Torvalds [this message]
2008-02-10 22:05       ` S.Çağlar Onur
2008-02-11 12:53         ` Stefan Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0802101056530.2896@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=caglar@pardus.org.tr \
    --cc=davem@davemloft.net \
    --cc=hidave.darkstar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=ricknu-0@student.ltu.se \
    --subject='Re: [PATCH] Silent compiler warning introduced by acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).