diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-28 18:37:34 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-07-02 12:46:16 +0200 |
commit | 64903d18dfd0344d5af3c0f8006b2e220de90091 (patch) | |
tree | f6ed4047b5d324adb513115fc9315ce25aaec5af /src/core/dbus-util.c | |
parent | Merge pull request #23827 from yuwata/sd-event-process-buffered-inotify-data (diff) | |
download | systemd-64903d18dfd0344d5af3c0f8006b2e220de90091.tar.xz systemd-64903d18dfd0344d5af3c0f8006b2e220de90091.zip |
basic/list: drop LIST_IS_EMPTY
This was a trivial wrapper that didn't provide any added value. With more
complicated structures like strvs, hashmaps, sets, and arrays, it is possible
to have an empty container. But in case of a list, the list is empty only when
the head is missing.
Also, we generally want the positive condition, so we replace many
if (!LIST_IS_EMPTY(x)) with just if (x).
Diffstat (limited to 'src/core/dbus-util.c')
-rw-r--r-- | src/core/dbus-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c index 32a2ec0ff9..264a4f55b6 100644 --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c @@ -216,7 +216,7 @@ int bus_read_mount_options( if (r < 0) return r; - if (!LIST_IS_EMPTY(options)) { + if (options) { if (ret_format_str) { char *final = strjoin(*ret_format_str, !isempty(*ret_format_str) ? separator : "", format_str); if (!final) |