qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPRO


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM
Date: Tue, 06 Apr 2010 08:44:46 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

On 04/06/2010 04:44 AM, Stefan Weil wrote:
> +#if EEPROM_SIZE > 0
>      /* Add 64 * 2 EEPROM. i82557 and i82558 support a 64 word EEPROM,
>       * i82559 and later support 64 or 256 word EEPROM. */
>      s->eeprom = eeprom93xx_new(EEPROM_SIZE);
> +#endif

If EEPROM_SIZE is known to be defined, even if zero, it is
better to write this as a C if, not a preprocessor ifdef.
Let the compiler eliminate the dead code for you.


r~




reply via email to

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