Print this page
5255 uts shouldn't open-code ISP2

@@ -21,10 +21,11 @@
 
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+#include <sys/sysmacros.h>
 #include <sys/socket.h>
 #include <sys/ddi.h>
 #include <sys/sunddi.h>
 #include <sys/tsol/tndb.h>
 #include <sys/tsol/tnet.h>

@@ -64,11 +65,11 @@
         int i;
 
         /* Start with /etc/system value */
         sctps->sctps_conn_hash_size = sctp_conn_hash_size;
 
-        if (sctps->sctps_conn_hash_size & (sctps->sctps_conn_hash_size - 1)) {
+        if (!ISP2(sctps->sctps_conn_hash_size)) {
                 /* Not a power of two. Round up to nearest power of two */
                 for (i = 0; i < 31; i++) {
                         if (sctps->sctps_conn_hash_size < (1 << i))
                                 break;
                 }