From ca261b65354f522ba43c823221763ca6f4604e2d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 30 Nov 2011 10:43:59 -0800 Subject: [PATCH] ovsdb-data: Short-circuit ovsdb_datum_includes_all() in trivial case. Signed-off-by: Ben Pfaff --- lib/ovsdb-data.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ovsdb-data.c b/lib/ovsdb-data.c index 17818119..bb8781c2 100644 --- a/lib/ovsdb-data.c +++ b/lib/ovsdb-data.c @@ -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; -- 2.30.2