1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

bus-message: let's always use -EBADMSG when the message is bad

-EINVAL means the arguments were somehow wrong, so translate the code we get
internally into -EBADMSG when returning.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-07-09 11:12:33 +02:00
parent ec6bda56cb
commit 69bd42ca07
2 changed files with 2 additions and 0 deletions

View File

@ -5385,6 +5385,8 @@ int bus_message_parse_fields(sd_bus_message *m) {
&m->root_container.item_size,
&m->root_container.offsets,
&m->root_container.n_offsets);
if (r == -EINVAL)
return -EBADMSG;
if (r < 0)
return r;
}