Re: [PATCH] IPv6: Allow Both IPv6 and IPv4 Sockets on the Same Port Number (IPV6_V6ONLY Support)

From: acme@conectiva.com.br
Date: Wed Oct 02 2002 - 22:53:15 EST


Quoting YOSHIFUJI Hideaki / $B5HF#1QL@(B <yoshfuji@linux-ipv6.org>:
 
> +#define IN6_IS_ADDR_V4MAPPED(a) \
> + ((((a)->s6_addr32[0]) == 0) && \
> + (((a)->s6_addr32[1]) == 0) && \
> + (((a)->s6_addr32[2]) == __constant_htonl(0x0000ffff)))
 
Please use plain htonl, __constant_htonl is only needed in static
initializations, in all other cases with constants as a parameter it
generates the same code as htonl, so lets prefer using the shorter,
more readable format.
 
- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:37 EST