Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2017 03:01:35 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318606 - head/sys/contrib/ipfilter/netinet
Message-ID:  <201705220301.v4M31ZiU059139@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Mon May 22 03:01:35 2017
New Revision: 318606
URL: https://svnweb.freebsd.org/changeset/base/318606

Log:
  Refactor & compact struct i6addr_t #ifdef: remove redundant structure
  definintion when USE_INET6 is false.
  
  MFC after:	1 week

Modified:
  head/sys/contrib/ipfilter/netinet/ip_fil.h

Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_fil.h	Mon May 22 02:30:15 2017	(r318605)
+++ head/sys/contrib/ipfilter/netinet/ip_fil.h	Mon May 22 03:01:35 2017	(r318606)
@@ -143,11 +143,12 @@ typedef	int	(* lookupfunc_t) __P((struct
  * i6addr is used as a container for both IPv4 and IPv6 addresses, as well
  * as other types of objects, depending on its qualifier.
  */
-#ifdef	USE_INET6
 typedef	union	i6addr	{
 	u_32_t	i6[4];
 	struct	in_addr	in4;
+#ifdef	USE_INET6
 	struct	in6_addr in6;
+#endif
 	void	*vptr[2];
 	lookupfunc_t	lptr[2];
 	struct {
@@ -156,19 +157,6 @@ typedef	union	i6addr	{
 		int	name;
 	} i6un;
 } i6addr_t;
-#else
-typedef	union	i6addr	{
-	u_32_t	i6[4];
-	struct	in_addr	in4;
-	void	*vptr[2];
-	lookupfunc_t	lptr[2];
-	struct {
-		u_short	type;
-		u_short	subtype;
-		int	name;
-	} i6un;
-} i6addr_t;
-#endif
 
 #define in4_addr	in4.s_addr
 #define	iplookupnum	i6[1]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705220301.v4M31ZiU059139>