From faef92f8daf09fd5134ea5556f3106b7878c741a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 26 May 2015 16:33:51 +0200 Subject: [PATCH] counters: remove last and now unused tm_name reference --- src/counters.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/src/counters.c b/src/counters.c index 539127b013..cb50a33ebd 100644 --- a/src/counters.c +++ b/src/counters.c @@ -61,9 +61,8 @@ enum { * \brief per thread store of counters */ typedef struct StatsThreadStore_ { - char *name; - - char *tm_name; + /** thread name used in output */ + const char *name; StatsPublicThreadContext *ctx; @@ -247,9 +246,6 @@ static void StatsReleaseCtx() sts = stats_ctx->sts; while (sts != NULL) { - if (sts->tm_name != NULL) - SCFree(sts->tm_name); - if (sts->head != NULL) SCFree(sts->head); @@ -559,24 +555,6 @@ static void StatsCopyCounterValue(StatsLocalCounter *pcae) return; } -/** - * \brief Calculates counter value that should be sent as output - * - * If we aren't dealing with timebased counters, we just return the - * the counter value. In case of Timebased counters, if we haven't - * crossed the interval, we display the current value without any - * modifications. If we have crossed the limit, we calculate the counter - * value for the time period and also return 1, to indicate that the - * counter value can be reset after use - * - * \param pc Pointer to the PerfCounter for which the timebased counter has to - * be calculated - */ -static uint64_t StatsOutputCalculateCounterValue(StatsCounter *pc) -{ - return pc->value; -} - /** * \brief The output interface for the Stats API */ @@ -631,8 +609,7 @@ static int StatsOutput(ThreadVars *tv) while (sts != NULL) { BUG_ON(thread < 0); - SCLogDebug("Thread %d %s (%s) ctx %p", thread, sts->name, - sts->tm_name ? sts->tm_name : "none", sts->ctx); + SCLogDebug("Thread %d %s ctx %p", thread, sts->name, sts->ctx); /* temporay table for quickly storing the counters for this * thread store, so that we can post process them outside