mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +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);
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user