From: Eric Leblond Date: Mon, 27 Aug 2012 13:18:33 +0000 (+0200) Subject: tm-thread: suppress rarely used variable. X-Git-Tag: suricata-1.4beta1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F39%2Fhead;p=thirdparty%2Fsuricata.git tm-thread: suppress rarely used variable. --- diff --git a/src/tm-threads.c b/src/tm-threads.c index 81f584cdd6..e779b6fd7b 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -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) {