From d5e2636b0ad51e32efa80913217c0fea1f282624 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 22 Apr 2019 15:45:34 +0200 Subject: [PATCH] Simplify trace_stop signature --- src/ccache.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ccache.c b/src/ccache.c index da6bf3602..0a9cdc765 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -3551,18 +3551,17 @@ trace_init(const char *json) } static void -trace_start(const char *json) +trace_start(const char *tracefile) { - trace_file = json; + trace_file = tracefile; MTR_META_PROCESS_NAME(MYNAME); trace_id = (void *) ((long) getpid()); MTR_START("program", "ccache", trace_id); } static void -trace_stop(void *context) +trace_stop(void) { - (void) context; const char *json = format("%s%s", output_obj, ".ccache-trace"); MTR_FINISH("program", "ccache", trace_id); mtr_flush(); @@ -3678,7 +3677,7 @@ initialize(void) if (tracefile != NULL) { #ifdef MTR_ENABLED trace_start(tracefile); - exitfn_add(trace_stop, NULL); + exitfn_add_nullary(trace_stop); #else cc_log("Error: tracing is not enabled!"); #endif -- 2.47.2