[ovs-dev] [PATCH] Embrace anonymous unions.

aserdean at ovn.org aserdean at ovn.org
Fri May 25 20:15:10 UTC 2018


> > On May 24, 2018, at 10:32 AM, Ben Pfaff <blp at ovn.org> wrote:
> >
> > Several OVS structs contain embedded named unions, like this:
> >
> > struct {
> >    ...
> >    union {
> >        ...
> >    } u;
> > };
> >
> > C11 standardized a feature that many compilers already implemented
> > anyway, where an embedded union may be unnamed, like this:
> >
> > struct {
> >    ...
> >    union {
> >        ...
> >    };
> > };
> >
> > This is more convenient because it allows the programmer to omit "u."
> > in many places.  OVS already used this feature in several places.
> > This commit embraces it in several others.
> >
> > Signed-off-by: Ben Pfaff <blp at ovn.org>
> 
> I didn't read through it carefully, but I support the change, and it's the
sort of
> thing that normally breaks in obvious ways.
> 
> Acked-by: Justin Pettit <jpettit at ovn.org>
> 
> --Justin
> 
> 
FYI I compiled on MSVC and ran the unit test and it was fine.

Tested-by: Alin Gabriel Serdean <aserdean at ovn.org>
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>



More information about the dev mailing list