]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
tm-thread: suppress rarely used variable. 39/head
authorEric Leblond <eric@regit.org>
Mon, 27 Aug 2012 13:18:33 +0000 (15:18 +0200)
committerEric Leblond <eric@regit.org>
Mon, 27 Aug 2012 14:07:21 +0000 (16:07 +0200)
src/tm-threads.c

index 81f584cdd6197bf174c96a9e4732ba2e3e7baeb7..e779b6fd7b65b9047e0483a027871096936b006e 100644 (file)
@@ -906,8 +906,6 @@ ThreadVars *TmThreadsGetTVContainingSlot(TmSlot *tm_slot)
  */
 static inline TmSlot * _TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, void *data)
 {
-    TmSlot *s = (TmSlot *)tv->tm_slots;
-
     TmSlot *slot = SCMalloc(sizeof(TmSlot));
     if (slot == NULL)
         return NULL;
@@ -927,11 +925,11 @@ static inline TmSlot * _TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, void *
 
     tv->cap_flags |= tm->cap_flags;
 
-    if (s == NULL) {
+    if (tv->tm_slots == NULL) {
         tv->tm_slots = slot;
         slot->id = 0;
     } else {
-        TmSlot *a = s, *b = NULL;
+        TmSlot *a = (TmSlot *)tv->tm_slots, *b = NULL;
 
         /* get the last slot */
         for ( ; a != NULL; a = a->slot_next) {