ovsdb-data: Short-circuit ovsdb_datum_includes_all() in trivial case.
[sliver-openvswitch.git] / lib / ovsdb-data.c
index 1781811..bb8781c 100644 (file)
@@ -1687,6 +1687,9 @@ ovsdb_datum_includes_all(const struct ovsdb_datum *a,
 {
     size_t i;
 
+    if (a->n > b->n) {
+        return false;
+    }
     for (i = 0; i < a->n; i++) {
         if (ovsdb_datum_find(a, i, b, type) == UINT_MAX) {
             return false;