[PATCH] kexec.c: workaround getline and fscanf to make it *libc agnostic. Tested against klibc and dietlibc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux