Looks good. Thanks for the change.

On Tue, Jun 18, 2013 at 9:55 AM, Ben Pfaff <[email protected]> wrote:

> Also, SIZE_MAX + 1 is 0, which is not a power of 2, so the following assert
> is redundant and this commit removes it.
>
> Signed-off-by: Ben Pfaff <[email protected]>
> ---
> v1->v2: Remove redundant assertion.
>
>  lib/hmap.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/hmap.c b/lib/hmap.c
> index 97c6959..f15e72c 100644
> --- a/lib/hmap.c
> +++ b/lib/hmap.c
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2008, 2009, 2010, 2012 Nicira, Inc.
> + * Copyright (c) 2008, 2009, 2010, 2012, 2013 Nicira, Inc.
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
> @@ -90,8 +90,7 @@ resize(struct hmap *hmap, size_t new_mask)
>      struct hmap tmp;
>      size_t i;
>
> -    ovs_assert(!(new_mask & (new_mask + 1)));
> -    ovs_assert(new_mask != SIZE_MAX);
> +    ovs_assert(is_pow2(new_mask + 1));
>
>      hmap_init(&tmp);
>      if (new_mask) {
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to