From c2fb27ca04ddb2a2a3d4c0671a70ac8471863294 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 21 Dec 2023 15:47:26 +0100 Subject: [PATCH] varlink: make use of varlink_error_invalid_parameter() helper where appropriate --- src/shared/varlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/shared/varlink.c b/src/shared/varlink.c index 9d68ba8b381..12a27fcb8df 100644 --- a/src/shared/varlink.c +++ b/src/shared/varlink.c @@ -1176,9 +1176,7 @@ static int generic_method_get_info( assert(link); if (json_variant_elements(parameters) != 0) - return varlink_errorb(link, VARLINK_ERROR_INVALID_PARAMETER, - JSON_BUILD_OBJECT( - JSON_BUILD_PAIR_VARIANT("parameter", json_variant_by_index(parameters, 0)))); + return varlink_error_invalid_parameter(link, parameters); product = strjoin("systemd (", program_invocation_short_name, ")"); if (!product)