shared/install: make install_changes_add propagate passed-in errno value
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2022 09:41:53 +0000 (11:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Oct 2022 10:37:19 +0000 (12:37 +0200)
commit94e7298d309fef7710174def820e9d38e512a086
treedd362e182fb525e8f9ef50d9712914c99b08b051
parent5ad58fea7303adebf588f8baf34fa84bbb4f036a
shared/install: make install_changes_add propagate passed-in errno value

The function was written to only return an error from internal allocation
failures, because when using it to create a bus message, we want to distinguish
a failed operation from an allocation error when sending the reply. But it
turns out that the only caller that makes this distinction checks that the
passed-in errno value ('type') is not negative beforehand. So we can make the
function pass 'type' value through, which makes most of the callers nicer.

No functional change.
src/shared/install.c
src/shared/install.h