rnatm

Load and structure data describing an atmosphere
git clone git://git.meso-star.fr/rnatm.git
Log | Files | Refs | README | LICENSE

commit 115ff9b78cf3cefc18fa00fce31e642524b516df
parent 1800a57ce8b0790158753f68e2a8cc55eba0ca29
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 16 Oct 2023 16:50:26 +0200

Fix of error messages

The variable used to print the error status was incorrect. We were using
the res variable of the total calculation instead of the thread-local
res variable used to detect the error.

Diffstat:
Msrc/rnatm_octree.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/rnatm_octree.c b/src/rnatm_octree.c @@ -1365,7 +1365,7 @@ create_octrees(struct rnatm* atm, const struct rnatm_create_args* args) const res_T res_local = voxelize_atmosphere(atm, pool, &sync); if(res_local != RES_OK) { log_err(atm, "error when voxelizing the atmosphere -- %s\n", - res_to_cstr((res_T)res)); + res_to_cstr((res_T)res_local)); pool_invalidate(pool); ATOMIC_SET(&res, res_local); } @@ -1375,7 +1375,8 @@ create_octrees(struct rnatm* atm, const struct rnatm_create_args* args) { const res_T res_local = build_octrees(atm, args, pool, &sync); if(res_local != RES_OK) { - log_err(atm, "error building octrees -- %s\n", res_to_cstr((res_T)res)); + log_err(atm, "error building octrees -- %s\n", + res_to_cstr((res_T)res_local)); pool_invalidate(pool); ATOMIC_SET(&res, res_local); }