From: Yu Watanabe Date: Tue, 13 May 2025 15:21:41 +0000 (+0900) Subject: login: use FOREACH_STRING() at one more place X-Git-Tag: v258-rc1~625^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3400abf3cafd0291da5e6016154f7c65763bdea1;p=thirdparty%2Fsystemd.git login: use FOREACH_STRING() at one more place --- diff --git a/src/login/logind.c b/src/login/logind.c index 877f30f9376..31565f1fce3 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -889,17 +889,11 @@ static int manager_connect_udev(Manager *m) { if (r < 0) return r; - r = sd_device_monitor_filter_add_match_subsystem_devtype(m->device_monitor, "input", NULL); - if (r < 0) - return r; - - r = sd_device_monitor_filter_add_match_subsystem_devtype(m->device_monitor, "graphics", NULL); - if (r < 0) - return r; - - r = sd_device_monitor_filter_add_match_subsystem_devtype(m->device_monitor, "drm", NULL); - if (r < 0) - return r; + FOREACH_STRING(s, "input", "graphics", "drm") { + r = sd_device_monitor_filter_add_match_subsystem_devtype(m->device_monitor, s, /* devtype = */ NULL); + if (r < 0) + return r; + } r = sd_device_monitor_attach_event(m->device_monitor, m->event); if (r < 0)