diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-17 21:06:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-17 21:13:02 +0200 |
commit | 1fe84279f7a8bfd656cb371b12f42c3ff125ee5a (patch) | |
tree | 01b6ca4dbbea35232bcc688b9ce396c736e361ab /src/core/dbus-socket.c | |
parent | dbus: add missing OOM check (diff) | |
download | systemd-1fe84279f7a8bfd656cb371b12f42c3ff125ee5a.tar.xz systemd-1fe84279f7a8bfd656cb371b12f42c3ff125ee5a.zip |
core: shorten list appending a bit, by using better macros
Diffstat (limited to '')
-rw-r--r-- | src/core/dbus-socket.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index a1d1b0c6f8..dc87e22b29 100644 --- a/src/core/dbus-socket.c +++ b/src/core/dbus-socket.c @@ -395,13 +395,7 @@ static int bus_socket_set_transient_property( empty = false; if (!UNIT_WRITE_FLAGS_NOOP(flags)) { - SocketPort *tail; - - LIST_FIND_TAIL(port, s->ports, tail); - LIST_INSERT_AFTER(port, s->ports, tail, p); - - p = NULL; - + LIST_APPEND(port, s->ports, TAKE_PTR(p)); unit_write_settingf(u, flags|UNIT_ESCAPE_SPECIFIERS, name, "Listen%s=%s", t, a); } } |