39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
From f4425c72c7395ec93ae00052916a66e2f60f200b Mon Sep 17 00:00:00 2001
|
|
From: Lennart Poettering <lennart@poettering.net>
|
|
Date: Wed, 22 Jan 2020 16:53:59 +0100
|
|
Subject: [PATCH] polkit: use structured initialization
|
|
|
|
https://github.com/systemd/systemd/commit/f4425c72c7395ec93ae00052916a66e2f60f200b
|
|
|
|
---
|
|
src/shared/bus-util.c | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
|
|
index 04153d6..0690a82 100644
|
|
--- a/src/shared/bus-util.c
|
|
+++ b/src/shared/bus-util.c
|
|
@@ -524,13 +524,15 @@ int bus_verify_polkit_async(
|
|
if (r < 0)
|
|
return r;
|
|
|
|
- q = new0(AsyncPolkitQuery, 1);
|
|
+ q = new(AsyncPolkitQuery, 1);
|
|
if (!q)
|
|
return -ENOMEM;
|
|
|
|
- q->request = sd_bus_message_ref(call);
|
|
- q->callback = callback;
|
|
- q->userdata = userdata;
|
|
+ *q = (AsyncPolkitQuery) {
|
|
+ .request = sd_bus_message_ref(call),
|
|
+ .callback = callback,
|
|
+ .userdata = userdata,
|
|
+ };
|
|
|
|
q->action = strdup(action);
|
|
if (!q->action) {
|
|
--
|
|
2.19.1
|
|
|