diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-03-14 17:48:29 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-03-19 21:04:02 +0900 |
commit | ee5324aa04bb46a9a8e1ad23307efa85e05879b6 (patch) | |
tree | 85cd5851f9d9139c25291f08f04307b1340e58a3 /src/busctl | |
parent | 24fcd009c3eb89f590bef96dd5495fd4ef796fd0 (diff) | |
download | systemd-ee5324aa04bb46a9a8e1ad23307efa85e05879b6.tar.gz systemd-ee5324aa04bb46a9a8e1ad23307efa85e05879b6.tar.bz2 systemd-ee5324aa04bb46a9a8e1ad23307efa85e05879b6.zip |
tree-wide: voidify pager_open()
Even if pager_open() fails, in general, we should continue the operations.
All erroneous cases in pager_open() show log message in the function.
So, it is not necessary to check the returned value.
Diffstat (limited to 'src/busctl')
-rw-r--r-- | src/busctl/busctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index ae4c8c26c0..2f9250e2ae 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -167,7 +167,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { if (r < 0) return log_error_errno(r, "Failed to list names: %m"); - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); names = hashmap_new(&string_hash_ops); if (!names) @@ -482,7 +482,7 @@ static int tree_one(sd_bus *bus, const char *service, const char *prefix, bool m p = NULL; } - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); l = set_get_strv(done); if (!l) @@ -516,7 +516,7 @@ static int tree(int argc, char **argv, void *userdata) { if (r < 0) return log_error_errno(r, "Failed to get name list: %m"); - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); STRV_FOREACH(i, names) { int q; @@ -546,7 +546,7 @@ static int tree(int argc, char **argv, void *userdata) { printf("\n"); if (argv[2]) { - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); printf("Service %s%s%s:\n", ansi_highlight(), *i, ansi_normal()); } @@ -1052,7 +1052,7 @@ static int introspect(int argc, char **argv, void *userdata) { return bus_log_parse_error(r); } - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); name_width = STRLEN("NAME"); type_width = STRLEN("TYPE"); @@ -1662,7 +1662,7 @@ static int call(int argc, char **argv, void *userdata) { if (r == 0 && !arg_quiet) { if (arg_verbose) { - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); r = bus_message_dump(reply, stdout, 0); if (r < 0) @@ -1713,7 +1713,7 @@ static int get_property(int argc, char **argv, void *userdata) { return bus_log_parse_error(r); if (arg_verbose) { - pager_open(arg_no_pager, false); + (void) pager_open(arg_no_pager, false); r = bus_message_dump(reply, stdout, BUS_MESSAGE_DUMP_SUBTREE_ONLY); if (r < 0) |