mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 14:55:18 +00:00
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@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org> Tested-by: Alin Gabriel Serdean <aserdean@ovn.org> Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
This commit is contained in:
@@ -71,7 +71,7 @@ struct json {
|
||||
long long int integer;
|
||||
double real;
|
||||
char *string;
|
||||
} u;
|
||||
};
|
||||
};
|
||||
|
||||
struct json *json_null_create(void);
|
||||
|
Reference in New Issue
Block a user