diff options
author | Ben Pfaff <blp@nicira.com> | 2009-11-16 16:54:13 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2009-11-16 16:56:07 -0800 |
commit | 4d0101a0323397fbb4aa9f5bea4946a55880e045 (patch) | |
tree | cd142fc0c0588fd71cd9e451917b003b311c84b3 /lib/ovsdb-parser.c | |
parent | 22f156fd06afb565c90ac9346d35a30612ba88e5 (diff) |
ovsdb-parser: Fix logic in ovsdb_parser_member().
I don't know why this test was written as it was. The new test makes more
sense, and may be more correct as well.
Diffstat (limited to 'lib/ovsdb-parser.c')
-rw-r--r-- | lib/ovsdb-parser.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/ovsdb-parser.c b/lib/ovsdb-parser.c index d923d21a..5419467c 100644 --- a/lib/ovsdb-parser.c +++ b/lib/ovsdb-parser.c @@ -80,11 +80,10 @@ ovsdb_parser_member(struct ovsdb_parser *parser, const char *name, return NULL; } - if (value->type >= 0 && value->type < JSON_N_TYPES - && (types & (1u << value->type) - || (types & OP_ID - && value->type == JSON_STRING - && is_id(value->u.string)))) + if ((value->type >= 0 && value->type < JSON_N_TYPES + && types & (1u << value->type)) + || (types & OP_ID && value->type == JSON_STRING + && is_id(value->u.string))) { svec_add(&parser->used, name); return value; |