From: Willy Tarreau Date: Wed, 2 Mar 2022 13:53:00 +0000 (+0100) Subject: BUILD: trace: do not declare trace_registre_source() inline X-Git-Tag: v2.6-dev3~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4de2cda1042a227195f0bbac772636cfa43b829d;p=thirdparty%2Fhaproxy.git BUILD: trace: do not declare trace_registre_source() inline This one is referenced in initcalls by its pointer, it makes no sense to declare it inline. At best it causes function duplication, at worst it doesn't build on older compilers. --- diff --git a/include/haproxy/trace.h b/include/haproxy/trace.h index 50857a0716..caf82a6641 100644 --- a/include/haproxy/trace.h +++ b/include/haproxy/trace.h @@ -130,6 +130,8 @@ void __trace(enum trace_level level, uint64_t mask, struct trace_source *src, const void *a1, const void *a2, const void *a3, const void *a4), const struct ist msg); +void trace_register_source(struct trace_source *source); + /* return a single char to describe a trace state */ static inline char trace_state_char(enum trace_state st) { @@ -144,21 +146,6 @@ static inline char trace_event_char(uint64_t conf, uint64_t ev) return (conf & ev) ? '+' : '-'; } -/* registers trace source . Modifies the list element! - * The {start,pause,stop,report} events are not changed so the source may - * preset them. - */ -static inline void trace_register_source(struct trace_source *source) -{ - source->lockon = TRACE_LOCKON_NOTHING; - source->level = TRACE_LEVEL_USER; - source->verbosity = 1; - source->sink = NULL; - source->state = TRACE_STATE_STOPPED; - source->lockon_ptr = NULL; - LIST_APPEND(&trace_sources, &source->source_link); -} - #endif /* _HAPROXY_TRACE_H */ /* diff --git a/src/trace.c b/src/trace.c index 15e01487fd..8a39854066 100644 --- a/src/trace.c +++ b/src/trace.c @@ -265,6 +265,21 @@ void __trace(enum trace_level level, uint64_t mask, struct trace_source *src, } } +/* registers trace source . Modifies the list element! + * The {start,pause,stop,report} events are not changed so the source may + * preset them. + */ +void trace_register_source(struct trace_source *source) +{ + source->lockon = TRACE_LOCKON_NOTHING; + source->level = TRACE_LEVEL_USER; + source->verbosity = 1; + source->sink = NULL; + source->state = TRACE_STATE_STOPPED; + source->lockon_ptr = NULL; + LIST_APPEND(&trace_sources, &source->source_link); +} + struct trace_source *trace_find_source(const char *name) { struct trace_source *src;