From 406102a731145d39c497e384857ac9f9d2bdccb2 Mon Sep 17 00:00:00 2001 From: Gennady Kupava Date: Sun, 26 Nov 2017 20:11:18 +0000 Subject: trace: remove trace key normalization Trace key normalization is not used, not strictly necessary, complicates the code and would negatively affect compilation speed if moved to header. New trace_default_key key or existing separate marco could be used instead of passing NULL as a key. Signed-off-by: Gennady Kupava Signed-off-by: Junio C Hamano --- trace.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'trace.h') diff --git a/trace.h b/trace.h index 179b249c5..24b32f8f4 100644 --- a/trace.h +++ b/trace.h @@ -11,6 +11,8 @@ struct trace_key { unsigned int need_close : 1; }; +extern struct trace_key trace_default_key; + #define TRACE_KEY_INIT(name) { "GIT_TRACE_" #name, 0, 0, 0 } extern void trace_repo_setup(const char *prefix); @@ -78,7 +80,7 @@ extern void trace_performance_since(uint64_t start, const char *format, ...); */ #define trace_printf(...) \ - trace_printf_key_fl(TRACE_CONTEXT, __LINE__, NULL, __VA_ARGS__) + trace_printf_key_fl(TRACE_CONTEXT, __LINE__, &trace_default_key, __VA_ARGS__) #define trace_printf_key(key, ...) \ trace_printf_key_fl(TRACE_CONTEXT, __LINE__, key, __VA_ARGS__) -- cgit v1.2.1