From: Lennart Poettering Date: Mon, 16 Apr 2018 19:37:12 +0000 (+0200) Subject: polkit: normalize exit values of polkit_agent_open_if_enabled() X-Git-Tag: v239~398^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b402966b9fedc1464061be41355b64ed72d0092;p=thirdparty%2Fsystemd.git polkit: normalize exit values of polkit_agent_open_if_enabled() It's strange eating up the errors here, hence don't. Let's leave this to the caller. --- diff --git a/src/shared/spawn-polkit-agent.h b/src/shared/spawn-polkit-agent.h index ea72c1281cf..c4316ea4739 100644 --- a/src/shared/spawn-polkit-agent.h +++ b/src/shared/spawn-polkit-agent.h @@ -12,17 +12,17 @@ int polkit_agent_open(void); void polkit_agent_close(void); -static inline void polkit_agent_open_if_enabled( +static inline int polkit_agent_open_if_enabled( BusTransport transport, bool ask_password) { /* Open the polkit agent as a child process if necessary */ if (transport != BUS_TRANSPORT_LOCAL) - return; + return 0; if (!ask_password) - return; + return 0; - polkit_agent_open(); + return polkit_agent_open(); }