mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
varlink: make use of varlink_error_invalid_parameter() helper where appropriate
This commit is contained in:
parent
afc50293bb
commit
c2fb27ca04
@ -1176,9 +1176,7 @@ static int generic_method_get_info(
|
|||||||
assert(link);
|
assert(link);
|
||||||
|
|
||||||
if (json_variant_elements(parameters) != 0)
|
if (json_variant_elements(parameters) != 0)
|
||||||
return varlink_errorb(link, VARLINK_ERROR_INVALID_PARAMETER,
|
return varlink_error_invalid_parameter(link, parameters);
|
||||||
JSON_BUILD_OBJECT(
|
|
||||||
JSON_BUILD_PAIR_VARIANT("parameter", json_variant_by_index(parameters, 0))));
|
|
||||||
|
|
||||||
product = strjoin("systemd (", program_invocation_short_name, ")");
|
product = strjoin("systemd (", program_invocation_short_name, ")");
|
||||||
if (!product)
|
if (!product)
|
||||||
|
Loading…
Reference in New Issue
Block a user