qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb s


From: Felix Deichmann
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.
Date: Wed, 14 Aug 2013 12:34:41 +0200

2013/8/14 Alexander Graf <address@hidden>:
>> -    void *fdt;
>> +    void *fdt = 0;
>
> This should be NULL. NULL doesn't have to be 0 according to C IIRC.

The last statement is wrong here, NULL is always the same as 0
language-wise. Although the above code is always correct, some will
consider it better style to use NULL when dealing with pointer
context.
What you probably meant is that the *internal representation* of a
null pointer is not guaranteed to be all-0-bits, in contrast to the
conceptual null pointer constant (== 0) understood and taken care of
by the compiler. But the internal representation is irrelevant here.

http://c-faq.com/null/

Felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]