X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fhmap.c;h=f15e72cb9e1ef9c9ca8c03aca6cfa6beca39f9a3;hb=f80022d9df98d29ee41176a4bc6cb91025da84b8;hp=5862b62783ea56c5b92f7831a1754f98e1af093b;hpb=e39e5b9d9d19f933cae177471dc0ebbc7e0041e7;p=sliver-openvswitch.git diff --git a/lib/hmap.c b/lib/hmap.c index 5862b6278..f15e72cb9 100644 --- a/lib/hmap.c +++ b/lib/hmap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2012 Nicira Networks. + * 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. @@ -16,7 +16,6 @@ #include #include "hmap.h" -#include #include #include #include "coverage.h" @@ -91,8 +90,7 @@ resize(struct hmap *hmap, size_t new_mask) struct hmap tmp; size_t i; - assert(!(new_mask & (new_mask + 1))); - assert(new_mask != SIZE_MAX); + ovs_assert(is_pow2(new_mask + 1)); hmap_init(&tmp); if (new_mask) {