summaryrefslogtreecommitdiff
path: root/ovsdb/transaction.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-24 10:32:59 -0700
committerBen Pfaff <blp@ovn.org>2018-05-25 13:36:05 -0700
commitfa37affad362df15fc59db00aa96ee79cd5eebd9 (patch)
treef539cdab21f0951aa8bb7c8b6984d9854d33112d /ovsdb/transaction.c
parent3d62892884d88cf1d0d02f58b3317e6ec0ca8971 (diff)
downloadopenvswitch-fa37affad362df15fc59db00aa96ee79cd5eebd9.tar.gz
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>
Diffstat (limited to 'ovsdb/transaction.c')
-rw-r--r--ovsdb/transaction.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c
index 256916fff..9801aca2b 100644
--- a/ovsdb/transaction.c
+++ b/ovsdb/transaction.c
@@ -225,7 +225,7 @@ ovsdb_txn_adjust_atom_refs(struct ovsdb_txn *txn, const struct ovsdb_row *r,
return NULL;
}
- table = base->u.uuid.refTable;
+ table = base->uuid.refTable;
for (i = 0; i < n; i++) {
const struct uuid *uuid = &atoms[i].uuid;
struct ovsdb_txn_row *txn_row;
@@ -322,7 +322,7 @@ delete_row_refs(struct ovsdb_txn *txn, const struct ovsdb_row *row,
return NULL;
}
- table = base->u.uuid.refTable;
+ table = base->uuid.refTable;
for (i = 0; i < n; i++) {
const struct uuid *uuid = &atoms[i].uuid;
struct ovsdb_txn_row *txn_row;
@@ -549,7 +549,7 @@ assess_weak_refs(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row)
for (i = 0; i < datum->n; ) {
const struct ovsdb_row *row;
- row = ovsdb_table_get_row(column->type.key.u.uuid.refTable,
+ row = ovsdb_table_get_row(column->type.key.uuid.refTable,
&datum->keys[i].uuid);
if (row) {
add_weak_ref(txn_row->new, row);
@@ -567,7 +567,7 @@ assess_weak_refs(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row)
for (i = 0; i < datum->n; ) {
const struct ovsdb_row *row;
- row = ovsdb_table_get_row(column->type.value.u.uuid.refTable,
+ row = ovsdb_table_get_row(column->type.value.uuid.refTable,
&datum->values[i].uuid);
if (row) {
add_weak_ref(txn_row->new, row);