On Mon, Mar 14, 2011 at 03:15:00PM +0100, Eric Dumazet wrote:
> > +/*
> > + * required_size
> > + * macro to find the minimum size of a struct
> > + * that includes a requested member
> > + */
> > +#define required_size(member, struct_type) \
> > +   (offsetof(typeof(struct_type), member) + \
> > +    sizeof(((typeof(struct_type) *)(0))->member))
> > +
> 
> Hmm, most similar macros reverse arguments.
> 
> (For example : offsetof())
I had 'list_entry' in mind.
> 
> What about
> 
> #define required_size(TYPE, MEMBER) ...
I'm not against that ...
If I receive no complaint for that, I can alter this in the next series.
> 
> 
Thanks,
Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to