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

Bernhard Walle bernhard at bwalle.de
Thu Nov 26 14:28:22 EST 2009


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


Regards,
Bernhard




More information about the kexec mailing list