[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: |
Alexander Graf |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine. |
Date: |
Wed, 14 Aug 2013 12:38:15 +0200 |
On 14.08.2013, at 12:34, Felix Deichmann wrote:
> 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/
Ah, very nice page explaining everything and more I ever wanted to know about
NULL ;).
Alex