lwip-devel
[Top][All Lists]
Advanced

[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: Bill Auerbach
Subject: RE: [lwip-devel] #if can't use enum vaule ETHARP_STATE_EMPTY
Date: Fri, 15 Feb 2008 08:34:52 -0500

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

This is standard enum syntax and will work everywhere.

Bill






reply via email to

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