On Wednesday 2010-02-10 16:33, Patrick McHardy wrote: >Jan Engelhardt wrote: >> +static unsigned int xt_hookmask_bitcount(unsigned int mask) >> +{ >> + unsigned int bits = 0; >> + >> + for (; mask != 0; mask >>= 1) >> + if (mask & 1) >> + ++bits; >> + return bits; >> +} > >Why not use hweight32()? Seriously, I looked for popcount (which is how this is called in hardware), and was disappointed. Thanks for pointing out hweight. -- 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