From: Lennart Poettering Date: Sat, 7 Feb 2026 21:57:41 +0000 (+0100) Subject: report: pass Context as first argument to metrics_call() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3317ea84bc40c0976e22de7fe6906c65c77036d2;p=thirdparty%2Fsystemd.git report: pass Context as first argument to metrics_call() Typically the context object should be the first one. And the return parameters should be the last ones. --- diff --git a/src/report/report.c b/src/report/report.c index 8da9e14994a..600dd7501a5 100644 --- a/src/report/report.c +++ b/src/report/report.c @@ -99,7 +99,7 @@ static int metrics_on_query_reply( return 0; } -static int metrics_call(const char *path, sd_event *event, sd_varlink **ret, Context *context) { +static int metrics_call(Context *context, const char *path, sd_event *event, sd_varlink **ret) { _cleanup_(sd_varlink_unrefp) sd_varlink *vl = NULL; int r; @@ -216,7 +216,7 @@ static int metrics_query(void) { if (!p) return log_oom(); - r = metrics_call(p, event, &varlinks[context.n_open_connections], &context); + r = metrics_call(&context, p, event, &varlinks[context.n_open_connections]); if (r < 0) continue;