Print this page
5083 avoid undefined order of operations in assignments

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/nxge/nxge_virtual.c
          +++ new/usr/src/uts/common/io/nxge/nxge_virtual.c
↓ open down ↓ 3956 lines elided ↑ open up ↑
3957 3957                  NXGE_DEBUG_MSG((NULL, INT_CTL,
3958 3958                      "==> nxge_ldgv_setup: ldvp $%p ngrps %d",
3959 3959                      *ldvp, *ngrps));
3960 3960                  ++*ldvp;
3961 3961          } else {
3962 3962                  (*ldgp)->ldvp = *ldvp;
3963 3963                  *ngrps += 1;
3964 3964                  NXGE_DEBUG_MSG((NULL, INT_CTL, "==> nxge_ldgv_setup(done): "
3965 3965                      "ldv %d endldg %d ldg %d, ldvp $%p",
3966 3966                      ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
3967      -                (*ldvp) = ++*ldvp;
3968      -                (*ldgp) = ++*ldgp;
     3967 +                ++*ldvp;
     3968 +                ++*ldgp;
3969 3969                  NXGE_DEBUG_MSG((NULL, INT_CTL,
3970 3970                      "==> nxge_ldgv_setup: new ngrps %d", *ngrps));
3971 3971          }
3972 3972  
3973 3973          NXGE_DEBUG_MSG((NULL, INT_CTL, "==> nxge_ldgv_setup: "
3974 3974              "ldv %d ldvp $%p endldg %d ngrps %d",
3975 3975              ldv, ldvp, endldg, *ngrps));
3976 3976  
3977 3977          NXGE_DEBUG_MSG((NULL, INT_CTL, "<== nxge_ldgv_setup"));
3978 3978  }
↓ open down ↓ 152 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX