Print this page
5083 avoid undefined order of operations in assignments

@@ -125,11 +125,11 @@
         wsp->coreid = wsp->coreid & CMI_MAX_COREID(wsp->core_nbits);
         if (carry == 0)
                 return (B_TRUE);
 
         /* increment the chip id */
-        wsp->chipid = ++wsp->chipid & (CMI_MAX_CHIPID);
+        wsp->chipid = (wsp->chipid + 1) & (CMI_MAX_CHIPID);
 
         return (B_TRUE);
 }
 
 /*