X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fovsdb-parser.c;h=2a4c3d99e89abd06a8c10f7cfe382712b2d96e39;hb=4f1046117c54e60b8ef6b7b21c23d3a4bf2e61fb;hp=d923d21a88897f48f20c206f4f0d758f424a814f;hpb=f85f8ebbfac946c19b3c6eb0f4170f579d0a4d25;p=openvswitch diff --git a/lib/ovsdb-parser.c b/lib/ovsdb-parser.c index d923d21a..2a4c3d99 100644 --- a/lib/ovsdb-parser.c +++ b/lib/ovsdb-parser.c @@ -41,8 +41,8 @@ ovsdb_parser_init(struct ovsdb_parser *parser, const struct json *json, } } -static bool -is_id(const char *string) +bool +ovsdb_parser_is_id(const char *string) { unsigned char 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 + && ovsdb_parser_is_id(value->u.string))) { svec_add(&parser->used, name); return value;