[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]

 



On Thu, Nov 26, 2009 at 08:28:22PM +0100, Bernhard Walle wrote:
> Yuri Bushmelev schrieb:
> > 
> > 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.
> > 
> 
> I know that kind of argument. However, it makes code IMO quite
> unreadable since it's uncommon at least in the kernel code. And that's
> the coding style we follow in kexec.
> 
> BTW: gcc warns about 'if (p = NULL)' anyways ...

I agree with Bernhard, though Yuri's point is a good one.

This aside, is everyone happy with the patch?
I'd like to merge it if possible.





[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