From 16bdcbeb0ea2ca33f1f6435a2285625284bc5e9c Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Mon, 27 Aug 2012 15:18:33 +0200 Subject: [PATCH] tm-thread: suppress rarely used variable. --- src/tm-threads.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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) { -- 2.47.2