Source-Changes archive

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

Re: CVS commit: src/sys



> Modified Files:
>       src/sys/dev/ic: ath.c
>       src/sys/net80211: ieee80211.c
> 
> Log Message:
> Do not index arrays using enum constants, since enums can be
> re-ordered and extended. Instead, use a switch-statement or a
> key->value table with appropriate bounds-checking.

The enum ieee80211_phymode is also used as index for ic_sup_rates[]
of ieee80211com, and the enum constants are explicitly assigned their
value for this reason.

Though the log message itself looks correct, the change (at least for
ieee80211.c) doesn't make sense to me.

Atsushi Onoe



Home | Main Index | Thread Index | Old Index