Print this page
5083 avoid undefined order of operations in assignments


 918             ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
 919 
 920         (*ldgp)->nldvs++;
 921         if ((*ldgp)->ldg == (endldg - 1)) {
 922                 if ((*ldgp)->ldvp == NULL) {
 923                         (*ldgp)->ldvp = *ldvp;
 924                         *ngrps += 1;
 925                         HXGE_DEBUG_MSG((NULL, INT_CTL,
 926                             "==> hxge_ldgv_setup: ngrps %d", *ngrps));
 927                 }
 928                 HXGE_DEBUG_MSG((NULL, INT_CTL,
 929                     "==> hxge_ldgv_setup: ldvp $%p ngrps %d",
 930                     *ldvp, *ngrps));
 931                 ++*ldvp;
 932         } else {
 933                 (*ldgp)->ldvp = *ldvp;
 934                 *ngrps += 1;
 935                 HXGE_DEBUG_MSG((NULL, INT_CTL, "==> hxge_ldgv_setup(done): "
 936                     "ldv %d endldg %d ldg %d, ldvp $%p",
 937                     ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
 938                 (*ldvp) = ++*ldvp;
 939                 (*ldgp) = ++*ldgp;
 940                 HXGE_DEBUG_MSG((NULL, INT_CTL,
 941                     "==> hxge_ldgv_setup: new ngrps %d", *ngrps));
 942         }
 943 
 944         HXGE_DEBUG_MSG((NULL, INT_CTL, "==> hxge_ldgv_setup: "
 945             "ldg %d nldvs %d ldv %d ldvp $%p endldg %d ngrps %d",
 946             (*ldgp)->ldg, (*ldgp)->nldvs, ldv, ldvp, endldg, *ngrps));
 947 
 948         HXGE_DEBUG_MSG((NULL, INT_CTL, "<== hxge_ldgv_setup"));
 949 }


 918             ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
 919 
 920         (*ldgp)->nldvs++;
 921         if ((*ldgp)->ldg == (endldg - 1)) {
 922                 if ((*ldgp)->ldvp == NULL) {
 923                         (*ldgp)->ldvp = *ldvp;
 924                         *ngrps += 1;
 925                         HXGE_DEBUG_MSG((NULL, INT_CTL,
 926                             "==> hxge_ldgv_setup: ngrps %d", *ngrps));
 927                 }
 928                 HXGE_DEBUG_MSG((NULL, INT_CTL,
 929                     "==> hxge_ldgv_setup: ldvp $%p ngrps %d",
 930                     *ldvp, *ngrps));
 931                 ++*ldvp;
 932         } else {
 933                 (*ldgp)->ldvp = *ldvp;
 934                 *ngrps += 1;
 935                 HXGE_DEBUG_MSG((NULL, INT_CTL, "==> hxge_ldgv_setup(done): "
 936                     "ldv %d endldg %d ldg %d, ldvp $%p",
 937                     ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
 938                 ++*ldvp;
 939                 ++*ldgp;
 940                 HXGE_DEBUG_MSG((NULL, INT_CTL,
 941                     "==> hxge_ldgv_setup: new ngrps %d", *ngrps));
 942         }
 943 
 944         HXGE_DEBUG_MSG((NULL, INT_CTL, "==> hxge_ldgv_setup: "
 945             "ldg %d nldvs %d ldv %d ldvp $%p endldg %d ngrps %d",
 946             (*ldgp)->ldg, (*ldgp)->nldvs, ldv, ldvp, endldg, *ngrps));
 947 
 948         HXGE_DEBUG_MSG((NULL, INT_CTL, "<== hxge_ldgv_setup"));
 949 }