On Wednesday 2008-04-09 15:21, Patrick McHardy wrote: > > The decoupling of netfilter supported protocols from AF values > makes sense. > > However I think _MAX definitions actually having the value MAX + 1 > is pretty poor style. When you see an array dimensioned as > [XYZ_MAX] you always have to check whether it is really the maximum > (and thus a bug) or maximum + 1. So I'd prefer to have MAX really > be the maximum and use max + 1 for arrays etc. > In this case, I'd just follow AF_ suit. Especially since NAME_MAX=256, PATH_MAX=4096 for example, _MAX is more often the total size rather than the last element. (The more even since loops use for (; x < MAX; ) rather than for (; x<= MAX;) as can probably be seen in a lot of userspace code.) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html