wdp-xflow: Remove wx structure from global list when closing.
[sliver-openvswitch.git] / lib / ovsdb-parser.c
index d923d21..2a4c3d9 100644 (file)
@@ -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;