Looks good,

I'm assuming that the same element can't be in 'a' twice.

What prompted this? Was it causing a performance problem, or did you
notice it by inspection?

Ethan

On Wed, Nov 30, 2011 at 10:45, Ben Pfaff <b...@nicira.com> wrote:
> ---
>  lib/ovsdb-data.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/lib/ovsdb-data.c b/lib/ovsdb-data.c
> index 1781811..bb8781c 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;
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to