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

@@ -23,10 +23,11 @@
  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
  */
 /* Copyright (c) 1990 Mentat Inc. */
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/stream.h>
 #include <sys/stropts.h>
 #include <sys/strlog.h>
 #include <sys/strsun.h>

@@ -4382,11 +4383,11 @@
         us->us_min_anonpriv_port = 512;
 
         us->us_bind_fanout_size = udp_bind_fanout_size;
 
         /* Roundup variable that might have been modified in /etc/system */
-        if (us->us_bind_fanout_size & (us->us_bind_fanout_size - 1)) {
+        if (!ISP2(us->us_bind_fanout_size)) {
                 /* Not a power of two. Round up to nearest power of two */
                 for (i = 0; i < 31; i++) {
                         if (us->us_bind_fanout_size < (1 << i))
                                 break;
                 }