intel / ledmon

Enclosure LED Utilities
GNU General Public License v2.0
72 stars 49 forks source link

libled: Specify public enum. values #176

Closed tasleson closed 1 year ago

tasleson commented 1 year ago

Be specific and assign the value for each enumeration. This prevents the case where a developer wants to add a new entry and inserts in the middle of existing enumerations. If this happened, the compiler would automatically re-assign different values to all the enumerations, breaking existing library users at run-time.

This change also reserves some regions of numeric values to ensure we have room for future additions.