]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Replace the old atomic sets using cas with the new sc_atomic_set macro
authorAnoop Saldanha <poonaatsoc@gmail.com>
Fri, 22 Jun 2012 18:19:44 +0000 (23:49 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 26 Jun 2012 07:36:11 +0000 (09:36 +0200)
src/detect-engine.c

index 6ae7d848466d8db6fc23cdc9fecfa71b58c79417..634f0aec7bab9a67b86b1358655f0dd71449e609 100644 (file)
@@ -227,8 +227,7 @@ static void *DetectEngineLiveRuleSwap(void *arg)
             }
 
 
-            BUG_ON(SC_ATOMIC_CAS(&slots->slot_data, SC_ATOMIC_GET(slots->slot_data),
-                                 det_ctx) == 0);;
+            SC_ATOMIC_SET(slots->slot_data, det_ctx);
             SCLogDebug("swapping new det_ctx with older one");
 
             slots = slots->slot_next;