mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
core/device: use LIST_FOREACH_AFTER() or friend
This commit is contained in:
parent
bbf1120623
commit
64af816228
@ -723,11 +723,11 @@ static Unit *device_following(Unit *u) {
|
||||
return NULL;
|
||||
|
||||
/* Make everybody follow the unit that's named after the sysfs path */
|
||||
for (other = d->same_sysfs_next; other; other = other->same_sysfs_next)
|
||||
LIST_FOREACH_AFTER(same_sysfs, other, d)
|
||||
if (startswith(UNIT(other)->id, "sys-"))
|
||||
return UNIT(other);
|
||||
|
||||
for (other = d->same_sysfs_prev; other; other = other->same_sysfs_prev) {
|
||||
LIST_FOREACH_BEFORE(same_sysfs, other, d) {
|
||||
if (startswith(UNIT(other)->id, "sys-"))
|
||||
return UNIT(other);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user