diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-02-08 16:37:49 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-02-08 16:37:49 -0800 |
| commit | ae8f13e29057e233712356b3c03f02a7ef4e1e93 (patch) | |
| tree | 3450bd2f4b286cfc36a20fb201962780728af02a /lib/ovsdb-types.c | |
| parent | fbf925e45da7100e5018bd3ad49532e407666f77 (diff) | |
| download | openvswitch-ae8f13e29057e233712356b3c03f02a7ef4e1e93.tar.gz | |
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.
Diffstat (limited to 'lib/ovsdb-types.c')
| -rw-r--r-- | lib/ovsdb-types.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c index 2cefd4d7e..5b7e7d8f6 100644 --- a/lib/ovsdb-types.c +++ b/lib/ovsdb-types.c @@ -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 * |
