From b6838d22dec2309713a769f9a7520d4270511188 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sun, 22 Oct 2023 08:18:42 -0400 Subject: [PATCH] rely on short-circuiting to avoid valgrind complaints (#1363) --- unit_test/react_util.H | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unit_test/react_util.H b/unit_test/react_util.H index 0c970fd08f..88a72b9112 100644 --- a/unit_test/react_util.H +++ b/unit_test/react_util.H @@ -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; } @@ -286,4 +286,3 @@ Real get_xn(const int index) { } #endif -