]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix coverity warnings 718636 and 718635
authorEric Leblond <eric@regit.org>
Thu, 6 Sep 2012 07:59:14 +0000 (09:59 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 6 Sep 2012 11:40:46 +0000 (13:40 +0200)
The result of the swap was not checked.

src/tm-threads.c

index cae708054a9255b3fb640c0b95c6dbd45274d268..629c367d1aac033e4f89c9dcbf867ad99330a885 100644 (file)
@@ -1025,7 +1025,7 @@ void TmThreadActivateDummySlot()
             }
             SC_ATOMIC_SET(s->slot_data, slot_data);
         }
-        SC_ATOMIC_CAS(&s->SlotFunc, TmDummyFunc, dslot->SlotFunc);
+        (void)SC_ATOMIC_CAS(&s->SlotFunc, TmDummyFunc, dslot->SlotFunc);
     }
 }
 
@@ -1037,7 +1037,7 @@ void TmThreadDeActivateDummySlot()
     TmDummySlot *dslot;
 
     TAILQ_FOREACH(dslot, &dummy_slots, next) {
-        SC_ATOMIC_CAS(&dslot->slot->SlotFunc, dslot->SlotFunc, TmDummyFunc);
+        (void)SC_ATOMIC_CAS(&dslot->slot->SlotFunc, dslot->SlotFunc, TmDummyFunc);
         dslot->slot->SlotThreadInit = NULL;
     }
 }