From: Eric Leblond Date: Thu, 6 Sep 2012 07:59:14 +0000 (+0200) Subject: Fix coverity warnings 718636 and 718635 X-Git-Tag: suricata-1.4beta1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7afa845a646e7b78bac90ccd053cf886e1c0d90;p=thirdparty%2Fsuricata.git Fix coverity warnings 718636 and 718635 The result of the swap was not checked. --- diff --git a/src/tm-threads.c b/src/tm-threads.c index cae708054a..629c367d1a 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -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; } }