counters: reduce scope of helper function

Not needed outside of the counters code.
pull/14398/head
Victor Julien 11 months ago
parent 5f754b11a6
commit 11f214bda8

@ -103,6 +103,7 @@ bool stats_stream_events = false;
static int StatsOutput(ThreadVars *tv); static int StatsOutput(ThreadVars *tv);
static int StatsThreadRegister(const char *thread_name, StatsPublicThreadContext *); static int StatsThreadRegister(const char *thread_name, StatsPublicThreadContext *);
void StatsReleaseCounters(StatsCounter *head); void StatsReleaseCounters(StatsCounter *head);
static int StatsUpdateCounterArray(StatsPrivateThreadContext *pca, StatsPublicThreadContext *pctx);
/** stats table is filled each interval and passed to the /** stats table is filled each interval and passed to the
* loggers. Initialized at first use. */ * loggers. Initialized at first use. */
@ -1273,7 +1274,7 @@ static inline void StatsCopyCounterValue(StatsCounter *pc, StatsLocalCounter *pc
* \retval 1 on success * \retval 1 on success
* \retval -1 on error * \retval -1 on error
*/ */
int StatsUpdateCounterArray(StatsPrivateThreadContext *pca, StatsPublicThreadContext *pctx) static int StatsUpdateCounterArray(StatsPrivateThreadContext *pca, StatsPublicThreadContext *pctx)
{ {
if (pca == NULL || pctx == NULL) { if (pca == NULL || pctx == NULL) {

@ -148,7 +148,6 @@ void StatsCounterMaxUpdateI64(struct ThreadVars_ *tv, StatsCounterMaxId id, int6
void StatsCounterAvgAddI64(struct ThreadVars_ *tv, StatsCounterAvgId id, int64_t x); void StatsCounterAvgAddI64(struct ThreadVars_ *tv, StatsCounterAvgId id, int64_t x);
/* utility functions */ /* utility functions */
int StatsUpdateCounterArray(StatsPrivateThreadContext *, StatsPublicThreadContext *);
uint64_t StatsGetLocalCounterValue(struct ThreadVars_ *, StatsCounterId); uint64_t StatsGetLocalCounterValue(struct ThreadVars_ *, StatsCounterId);
int StatsSetupPrivate(struct ThreadVars_ *); int StatsSetupPrivate(struct ThreadVars_ *);
void StatsThreadCleanup(struct ThreadVars_ *); void StatsThreadCleanup(struct ThreadVars_ *);

Loading…
Cancel
Save