Print this page
5255 uts shouldn't open-code ISP2
@@ -22,10 +22,11 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#include <sys/sysmacros.h>
#include <sys/kmem.h>
#include <sys/ksynch.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <sys/disp.h>
@@ -282,11 +283,11 @@
/*
* If ilbs->ilbs_rule_hash_size is not a power of 2, bump it up to
* the next power of 2.
*/
- if (ilbs->ilbs_rule_hash_size & (ilbs->ilbs_rule_hash_size - 1)) {
+ if (!ISP2(ilbs->ilbs_rule_hash_size)) {
for (i = 0; i < 31; i++) {
if (ilbs->ilbs_rule_hash_size < (1 << i))
break;
}
ilbs->ilbs_rule_hash_size = 1 << i;