X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fhmap.c;h=f15e72cb9e1ef9c9ca8c03aca6cfa6beca39f9a3;hb=6b900de4efd368be88ef3db88b1eff8f835a7cf7;hp=19710295da2c0fe0785c76ff345ef9ae8d2c7a23;hpb=8706009e555bb9fa04a5679e4be2c7c67506802b;p=sliver-openvswitch.git diff --git a/lib/hmap.c b/lib/hmap.c index 19710295d..f15e72cb9 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. @@ -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) {