diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-10 21:15:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-10 21:15:44 +0100 |
commit | 0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19 (patch) | |
tree | 94a7ea7f1aa53dd2b5b30813688029d4c2401bc6 /src/timedate/timedatectl.c | |
parent | pager: cache not only number of columns but also of lines before we open pager (diff) | |
download | systemd-0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19.tar.xz systemd-0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19.zip |
tree-wide: use _cleanup_(sd_bus_flush_close_unrefp) at various appropriate places
Let's shorten the code a bit.
Diffstat (limited to '')
-rw-r--r-- | src/timedate/timedatectl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 6fe9422f94..5121dd153a 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -472,7 +472,7 @@ static int timedatectl_main(sd_bus *bus, int argc, char *argv[]) { } int main(int argc, char *argv[]) { - sd_bus *bus = NULL; + _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); @@ -492,7 +492,6 @@ int main(int argc, char *argv[]) { r = timedatectl_main(bus, argc, argv); finish: - sd_bus_flush_close_unref(bus); pager_close(); return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; |