Author: cy
Date: Tue May 30 03:33:48 2017
New Revision: 319179
URL: https://svnweb.freebsd.org/changeset/base/319179

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

Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_fil.h     Tue May 30 03:30:53 
2017        (r319178)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_fil.h     Tue May 30 03:33:48 
2017        (r319179)
@@ -143,11 +143,12 @@ typedef   int     (* lookupfunc_t) __P((struct 
ipf_main_soft
  * 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]
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"

Reply via email to