<div dir="ltr">as is, 'is_pow2' already catchs the next line' assert. <br>But I am not sure why is_pow2 should reject 0. <br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 17, 2013 at 11:35 AM, Ben Pfaff <span dir="ltr"><<a href="mailto:blp@nicira.com" target="_blank">blp@nicira.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Ben Pfaff <<a href="mailto:blp@nicira.com">blp@nicira.com</a>><br>
---<br>
lib/hmap.c | 4 ++--<br>
1 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/lib/hmap.c b/lib/hmap.c<br>
index 97c6959..a845269 100644<br>
--- a/lib/hmap.c<br>
+++ b/lib/hmap.c<br>
@@ -1,5 +1,5 @@<br>
/*<br>
- * Copyright (c) 2008, 2009, 2010, 2012 Nicira, Inc.<br>
+ * Copyright (c) 2008, 2009, 2010, 2012, 2013 Nicira, Inc.<br>
*<br>
* Licensed under the Apache License, Version 2.0 (the "License");<br>
* you may not use this file except in compliance with the License.<br>
@@ -90,7 +90,7 @@ resize(struct hmap *hmap, size_t new_mask)<br>
struct hmap tmp;<br>
size_t i;<br>
<br>
- ovs_assert(!(new_mask & (new_mask + 1)));<br>
+ ovs_assert(is_pow2(new_mask + 1));<br>
ovs_assert(new_mask != SIZE_MAX);<br>
<br>
hmap_init(&tmp);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.2.5<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openvswitch.org">dev@openvswitch.org</a><br>
<a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</font></span></blockquote></div><br></div>