[ovs-git] [openvswitch/ovs] fa37af: Embrace anonymous unions.

GitHub noreply at github.com
Fri May 25 20:37:40 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: fa37affad362df15fc59db00aa96ee79cd5eebd9
      https://github.com/openvswitch/ovs/commit/fa37affad362df15fc59db00aa96ee79cd5eebd9
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-05-25 (Fri, 25 May 2018)

  Changed paths:
    M include/openvswitch/json.h
    M lib/db-ctl-base.c
    M lib/dpif-netdev.c
    M lib/dpif-netlink.c
    M lib/dpif.c
    M lib/dpif.h
    M lib/json.c
    M lib/jsonrpc.c
    M lib/netdev-dummy.c
    M lib/ovsdb-data.c
    M lib/ovsdb-idl.c
    M lib/ovsdb-parser.c
    M lib/ovsdb-types.c
    M lib/ovsdb-types.h
    M ofproto/ofproto-dpif-upcall.c
    M ofproto/ofproto.c
    M ovsdb/column.c
    M ovsdb/condition.c
    M ovsdb/execution.c
    M ovsdb/file.c
    M ovsdb/jsonrpc-server.c
    M ovsdb/log.c
    M ovsdb/mutation.c
    M ovsdb/ovsdb-client.c
    M ovsdb/ovsdb-idlc.in
    M ovsdb/ovsdb-server.c
    M ovsdb/ovsdb-tool.c
    M ovsdb/ovsdb-util.c
    M ovsdb/ovsdb.c
    M ovsdb/replication.c
    M ovsdb/storage.c
    M ovsdb/table.c
    M ovsdb/transaction.c
    M ovsdb/trigger.c
    M python/ovs/db/types.py
    M tests/test-json.c
    M tests/test-jsonrpc.c
    M tests/test-ovsdb.c

  Log Message:
  -----------
  Embrace anonymous unions.

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>
Acked-by: Justin Pettit <jpettit at ovn.org>
Tested-by: Alin Gabriel Serdean <aserdean at ovn.org>
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list