From: Yuri Bushmelev <jay4mail@gmail.com>
To: Simon Horman <horms@verge.net.au>
Cc: Bernhard Walle <bernhard@bwalle.de>,
kexec@lists.infradead.org, Andrea Adami <andrea.adami@gmail.com>
Subject: Re: [PATCH] kexec.c: workaround getline and fscanf to make it *libc agnostic. Tested against klibc and dietlibc.
Date: Thu, 26 Nov 2009 13:34:10 +0300 [thread overview]
Message-ID: <200911261334.10310.jay4mail@gmail.com> (raw)
In-Reply-To: <20091126001410.GA853@verge.net.au>
Hello!
> On Thu, Nov 26, 2009 at 12:37:08AM +0100, Bernhard Walle wrote:
> > Simon Horman schrieb:
> > > +
> > > + if ( NULL == p)
> > > + return -1;
> >
> > Wouldn't that be better 'p == NULL'?
>
> Agreed
That is form of 'early bug detection' of mistyped '=='.
E.g. you can write by mistype
if (p = NULL) {}
but can't
if (NULL = p) {}
because you will get compiler error.
--
Yuri Bushmelev
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2009-11-26 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 23:12 [PATCH] kexec.c: workaround getline and fscanf to make it *libc agnostic. Tested against klibc and dietlibc Andrea Adami
2009-11-22 5:03 ` Simon Horman
2009-11-22 9:24 ` Bernhard Walle
2009-11-25 23:17 ` Simon Horman
2009-11-25 23:37 ` Bernhard Walle
2009-11-26 0:14 ` Simon Horman
2009-11-26 10:34 ` Yuri Bushmelev [this message]
2009-11-26 19:28 ` Bernhard Walle
2009-11-26 21:42 ` Simon Horman
2009-11-27 7:05 ` Bernhard Walle
2009-11-27 9:26 ` Yuri Bushmelev
2009-11-27 10:48 ` Simon Horman
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=200911261334.10310.jay4mail@gmail.com \
--to=jay4mail@gmail.com \
--cc=andrea.adami@gmail.com \
--cc=bernhard@bwalle.de \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.