[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] #if can't use enum vaule ETHARP_STATE_EMPTY
From: |
Kieran Mansley |
Subject: |
Re: [lwip-devel] #if can't use enum vaule ETHARP_STATE_EMPTY |
Date: |
Fri, 15 Feb 2008 09:32:43 +0000 |
On Thu, 2008-02-14 at 13:54 -0500, Edward Kerekes wrote:
>
> Same code with new comment:
>
> enum etharp_state {
>
> ETHARP_STATE_EMPTY, /* “ETHARP_STATE_EMPTY must be 0 to ensure
> correct initialization value!” */
>
> ETHARP_STATE_PENDING,
>
> ETHARP_STATE_STABLE
>
> };
>
Anyone know why we couldn't just do:
enum etharp_state {
/* “ETHARP_STATE_EMPTY must be 0 to ensure correct initialization
value!” */
ETHARP_STATE_EMPTY = 0,
ETHARP_STATE_PENDING,
ETHARP_STATE_STABLE
};
i.e. force it to be zero? I'm never sure if such things are supported
on all compilers.
Kieran