svn commit: r343556 - stable/12/sys/net

Brooks Davis brooks at FreeBSD.org
Tue Jan 29 18:06:37 UTC 2019


Author: brooks
Date: Tue Jan 29 18:06:35 2019
New Revision: 343556
URL: https://svnweb.freebsd.org/changeset/base/343556

Log:
  MFC r343305:
  
  Rework CASE_IOC_IFGROUPREQ() to require a case before the macro.
  
  This is more compatible with formatting tools and looks more normal.
  
  Reported by:	jhb (on a different review)
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D18442

Modified:
  stable/12/sys/net/if.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/if.c
==============================================================================
--- stable/12/sys/net/if.c	Tue Jan 29 17:52:42 2019	(r343555)
+++ stable/12/sys/net/if.c	Tue Jan 29 18:06:35 2019	(r343556)
@@ -168,14 +168,14 @@ struct ifmediareq32 {
 #define	SIOCGIFXMEDIA32	_IOC_NEWTYPE(SIOCGIFXMEDIA, struct ifmediareq32)
 
 #define	_CASE_IOC_IFGROUPREQ_32(cmd)				\
-    case _IOC_NEWTYPE((cmd), struct ifgroupreq32):
+    _IOC_NEWTYPE((cmd), struct ifgroupreq32): case
 #else /* !COMPAT_FREEBSD32 */
 #define _CASE_IOC_IFGROUPREQ_32(cmd)
 #endif /* !COMPAT_FREEBSD32 */
 
 #define CASE_IOC_IFGROUPREQ(cmd)	\
     _CASE_IOC_IFGROUPREQ_32(cmd)	\
-    case (cmd)
+    (cmd)
 
 union ifreq_union {
 	struct ifreq	ifr;
@@ -2892,7 +2892,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data,
 		error = if_gethwaddr(ifp, ifr);
 		break;
 
-	CASE_IOC_IFGROUPREQ(SIOCAIFGROUP):
+	case CASE_IOC_IFGROUPREQ(SIOCAIFGROUP):
 		error = priv_check(td, PRIV_NET_ADDIFGROUP);
 		if (error)
 			return (error);
@@ -2901,12 +2901,12 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data,
 			return (error);
 		break;
 
-	CASE_IOC_IFGROUPREQ(SIOCGIFGROUP):
+	case CASE_IOC_IFGROUPREQ(SIOCGIFGROUP):
 		if ((error = if_getgroup((struct ifgroupreq *)data, ifp)))
 			return (error);
 		break;
 
-	CASE_IOC_IFGROUPREQ(SIOCDIFGROUP):
+	case CASE_IOC_IFGROUPREQ(SIOCDIFGROUP):
 		error = priv_check(td, PRIV_NET_DELIFGROUP);
 		if (error)
 			return (error);
@@ -3061,7 +3061,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, s
 		error = if_clone_list((struct if_clonereq *)data);
 		goto out_noref;
 
-	CASE_IOC_IFGROUPREQ(SIOCGIFGMEMB):
+	case CASE_IOC_IFGROUPREQ(SIOCGIFGMEMB):
 		error = if_getgroupmembers((struct ifgroupreq *)data);
 		goto out_noref;
 


More information about the svn-src-stable-12 mailing list