From 4d0101a0323397fbb4aa9f5bea4946a55880e045 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 16 Nov 2009 16:54:13 -0800 Subject: [PATCH] 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. --- lib/ovsdb-parser.c | 9 ++++----- 1 file 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; -- 2.30.2