svn commit: r343305 - head/sys/net

Brooks Davis brooks at freebsd.org
Tue Jan 22 18:57:22 UTC 2019


On Tue, Jan 22, 2019 at 01:12:57PM -0500, Mark Johnston wrote:
> On Tue, Jan 22, 2019 at 10:45:16AM -0700, Ian Lepore wrote:
> > On Tue, 2019-01-22 at 17:39 +0000, Brooks Davis wrote:
> > > Author: brooks
> > > Date: Tue Jan 22 17:39:26 2019
> > > New Revision: 343305
> > > URL: https://svnweb.freebsd.org/changeset/base/343305
> > > 
> > > Log:
> > >   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:
> > >   head/sys/net/if.c
> > > 
> > > Modified: head/sys/net/if.c
> > > =====================================================================
> > > =========
> > > --- head/sys/net/if.c	Tue Jan 22 17:34:53 2019	(r343304)
> > > +++ head/sys/net/if.c	Tue Jan 22 17:39:26 2019	(r343305)
> > > @@ -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
> > 
> > That 'case' at the end of the line doesn't look right.
> 
> With the change, CASE_IOC_IFGROUPREQ(cmd) yields
> 
>   case <cmd>32: case <cmd>:
> 
> which seems to be the intent.

This is the intent.  This macro avoids a pile of #ifdef macros in the
actual code (and makes more sense in my upstream branch where I have
another set of ioctl values).

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20190122/129573b0/attachment.sig>


More information about the svn-src-head mailing list