summaryrefslogtreecommitdiffstats
path: root/src/login
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-07-12 08:52:12 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-07-12 20:05:18 +0200
commita1af83728f49c0b7487368d54cab90c8c87ac3f6 (patch)
treeda4b319e8a2fc0c513ca1a07852a6442352ff883 /src/login
parentseccomp: add arm_fadvise64_64 to system-service group (diff)
downloadsystemd-a1af83728f49c0b7487368d54cab90c8c87ac3f6.tar.xz
systemd-a1af83728f49c0b7487368d54cab90c8c87ac3f6.zip
device-util: Declare iterator variables inline
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-core.c1
-rw-r--r--src/login/logind-dbus.c6
-rw-r--r--src/login/logind.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index df67e5509b..af86e92c01 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -565,7 +565,6 @@ static bool manager_is_docked(Manager *m) {
static int manager_count_external_displays(Manager *m) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
- sd_device *d;
int r, n = 0;
r = sd_device_enumerator_new(&e);
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 0d4ab28b4d..b3a36d0d05 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1296,7 +1296,7 @@ static int method_set_user_linger(sd_bus_message *message, void *userdata, sd_bu
return sd_bus_reply_method_return(message, NULL);
}
-static int trigger_device(Manager *m, sd_device *d) {
+static int trigger_device(Manager *m, sd_device *parent) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
int r;
@@ -1310,8 +1310,8 @@ static int trigger_device(Manager *m, sd_device *d) {
if (r < 0)
return r;
- if (d) {
- r = sd_device_enumerator_add_match_parent(e, d);
+ if (parent) {
+ r = sd_device_enumerator_add_match_parent(e, parent);
if (r < 0)
return r;
}
diff --git a/src/login/logind.c b/src/login/logind.c
index 8323bcc0cb..f30f7f9370 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -190,7 +190,6 @@ static Manager* manager_free(Manager *m) {
static int manager_enumerate_devices(Manager *m) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
- sd_device *d;
int r;
assert(m);
@@ -219,7 +218,6 @@ static int manager_enumerate_devices(Manager *m) {
static int manager_enumerate_buttons(Manager *m) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
- sd_device *d;
int r;
assert(m);