2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ovsdb: Make scalars and 1-element sets interchangeable.

It is natural to write "abc" in place of ["set",["abc"]] and vice versa.
I cannot think of a reason not to support this, and it can make reading
and writing OVSDB files and transactions easier, so support it.
This commit is contained in:
Ben Pfaff
2010-02-08 16:37:49 -08:00
parent fbf925e45d
commit ae8f13e290
7 changed files with 78 additions and 68 deletions

View File

@@ -566,7 +566,8 @@ ovsdb_type_is_valid(const struct ovsdb_type *type)
&& ovsdb_base_type_is_valid(&type->key)
&& ovsdb_base_type_is_valid(&type->value)
&& type->n_min <= 1
&& type->n_min <= type->n_max);
&& type->n_min <= type->n_max
&& type->n_max >= 1);
}
static struct ovsdb_error *