From 06bda4cd5196a520e34688d85a11d16cf4acb999 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sat, 21 Oct 2023 12:07:38 -0400 Subject: [PATCH] rely on short-circuiting to avoid valgrind complaints --- 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 -