Skip to content

Commit

Permalink
rely on short-circuiting to avoid valgrind complaints (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Oct 22, 2023
1 parent b28cd4e commit b6838d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions unit_test/react_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ void get_xn(const int k, const init_t cd, Real *xn_zone, int uniform_composition

for (int n = 0; n < NumSpec; n++) {
if (n == cd.is1 ||
(n == cd.is2 && cd.nprim >= 2) ||
(n == cd.is3 && cd.nprim >= 3)) {
(cd.nprim >= 2 && n == cd.is2) ||
(cd.nprim >= 3 && n == cd.is3)) {
continue;
}

Expand Down Expand Up @@ -286,4 +286,3 @@ Real get_xn(const int index) {
}

#endif

0 comments on commit b6838d2

Please sign in to comment.