From cb4eab2a2ca6ed746381c4980d44ba9aa1c2aaaf Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Tue, 6 Nov 2018 10:25:03 +0000 Subject: [PATCH] No need to take the minimum when updating a root. --- src/fof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fof.c b/src/fof.c index e738369b60..d8c804d0d8 100644 --- a/src/fof.c +++ b/src/fof.c @@ -185,7 +185,7 @@ __attribute__((always_inline)) INLINE static size_t update_root( old_val = *address; test_val = old_val; - new_val = min(old_val, y); + new_val = y; /* atomic_cas returns old_val if *size_t_ptr has not changed since being read.*/ old_val = atomic_cas(size_t_ptr, test_val, new_val); -- GitLab