lib: pretty ip_masklen and masklen2ip

nonwithstanding any desire for optimisation, these versions are shorter
and more concise.  reading the comments, they might even be easier to
understand.

I've tested them on i686 and x86_64, and checked that correct assembler
code is emitted for ARM, MIPS and PowerPC.

IPv6 is left as an exercise for another day, none of the ideas I had led
to a "yes, this is the one to go with" solution.

Signed-off-by: David Lamparter <equinox@diac24.net>
1 file changed