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.
This commit is contained in:
Lennart Poettering 2018-04-16 21:37:12 +02:00
parent d47410f3fb
commit 3b402966b9

View file

@ -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();
}