summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index 176aa6b8ef..23cb0ead9a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5663,11 +5663,10 @@ onig_transfer(regex_t* to, regex_t* from)
extern void
onig_chain_link_add(regex_t* to, regex_t* add)
{
- /* THREAD_ATOMIC_START; */
- do {
- REGEX_CHAIN_HEAD(to);
- } while (IS_NOT_NULL(ATOMIC_PTR_CAS(to->chain, (regex_t* )NULL, add)));
- /* THREAD_ATOMIC_END; */
+ THREAD_ATOMIC_START;
+ REGEX_CHAIN_HEAD(to);
+ to->chain = add;
+ THREAD_ATOMIC_END;
}
extern void