]> git.proxmox.com Git - mirror_ovs.git/commit
openvswitch/types.h: Drop the member name in initializer macro
authorShashank Ram <rams@vmware.com>
Thu, 25 Jan 2018 18:12:08 +0000 (10:12 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 25 Jan 2018 18:35:23 +0000 (10:35 -0800)
commit66bab9c9dad103bd5ff3d25484ea6920df62de94
tree45567ffa4b357131032951f2416e597588b539b8
parent48bcbcc6db7faccb3976d5f16c73d2739249d215
openvswitch/types.h: Drop the member name in initializer macro

MSVC++ compiler does not allow initializing a struct while
explicitly initializing a member in the struct.

Not allowed:
    static const struct eth_addr a = {{ .ea= { 0xff, 0xff, 0xff, 0xff,
                                        0xff, 0xff }}};

Alowed:
    static const struct eth_addr b  = {{{ 0xff, 0xff, 0xff, 0xff, 0xff,
                                          0xff }}};
*An extra curly brace is required for GCC in case the struct contains
a union.

Signed-off-by: Shashank Ram <rams@vmware.com>
Tested-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
include/openvswitch/types.h