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

@@ -946,12 +946,11 @@
         error = vn_rdwr(UIO_READ, vp, (caddr_t)hdr, sizeof (struct comphdr), 0,
             UIO_SYSSPACE, 0, 0, cred, NULL);
         if (error || hdr->ch_magic != CH_MAGIC_ZLIB ||
             hdr->ch_version != CH_VERSION || hdr->ch_algorithm != CH_ALG_ZLIB ||
             hdr->ch_fsize == 0 || hdr->ch_blksize < PAGESIZE ||
-            hdr->ch_blksize > ptob(DCCACHESIZE) ||
-            (hdr->ch_blksize & (hdr->ch_blksize - 1)) != 0)
+            hdr->ch_blksize > ptob(DCCACHESIZE) || !ISP2(hdr->ch_blksize))
                 return (NULL);
 
         /* get underlying file size */
         if (VOP_GETATTR(vp, &vattr, 0, cred, ctp) != 0)
                 return (NULL);