On 10:30 Wed 04 Feb , Ira Weiny wrote: > > > > I don't understand how enum typedefing makes things cleaner - actually > > this will enforce me explicitly to verify an actual type in header > > files. Sometimes typedefs could help with porting, but it is not the > > case here. > > Yes, this will force you to use the correct type.
Not "typedef" will do it, but proper prototypes. > Again, I am trying to write a library which makes it easier for someone who > might not be familiar with IB to extract diagnostic data. I understand you > wanting the decoding of the data to be more flexible and abstract but we > should > make the interface for decoding that data easier to use. I feel the following > patch does this. > > Would you prefer to use: > > uint32_t mad_get_field(void *buf, int base_offs, enum MAD_FIELDS field); > > ? Yes, this would be correct and clear. Sasha _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
