From: Zbigniew Jędrzejewski-Szmek Date: Fri, 3 Apr 2026 08:59:18 +0000 (+0200) Subject: tree-wide: drop flush&check step after table printing X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ce5a8fb4ee182da1967c8d99ce100f1c484ad15;p=thirdparty%2Fsystemd.git tree-wide: drop flush&check step after table printing Almost all callers of table_print() specify stdout or NULL (equivalent to stdout) as the output stream. Simplify things by not requiring the the stream to be specified. In almost all cases, the printing of the table is surrounded by normal printfs() that don't do explicit flushing and for which we don't check the output stream status. Let's simplify most callers and skip this step. The reason is not so much to avoid the extra step itself, but instead to avoid the _handling_ of the potential failure. We generally only want to print an error message for ENOMEM and other "internal" errors, so strictly speaking we should filter out the errors from the stream. By skipping the flush&check step we implicitly do this. --- diff --git a/src/ac-power/ac-power.c b/src/ac-power/ac-power.c index 1ca1048c5a4..b153194cdbf 100644 --- a/src/ac-power/ac-power.c +++ b/src/ac-power/ac-power.c @@ -37,7 +37,7 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/analyze/analyze-calendar.c b/src/analyze/analyze-calendar.c index ac0b2da7d82..ea99f3871e8 100644 --- a/src/analyze/analyze-calendar.c +++ b/src/analyze/analyze-calendar.c @@ -119,7 +119,7 @@ static int test_calendar_one(usec_t n, const char *p) { n = next; } - return table_print(table, NULL); + return table_print(table); } int verb_calendar(int argc, char *argv[], uintptr_t _data, void *userdata) { diff --git a/src/analyze/analyze-image-policy.c b/src/analyze/analyze-image-policy.c index 93777c91a1f..16e69414c12 100644 --- a/src/analyze/analyze-image-policy.c +++ b/src/analyze/analyze-image-policy.c @@ -157,7 +157,7 @@ int verb_image_policy(int argc, char *argv[], uintptr_t _data, void *userdata) { putc('\n', stdout); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return r; } diff --git a/src/analyze/analyze-inspect-elf.c b/src/analyze/analyze-inspect-elf.c index 41dabd051c8..f4fcc3bd570 100644 --- a/src/analyze/analyze-inspect-elf.c +++ b/src/analyze/analyze-inspect-elf.c @@ -118,7 +118,7 @@ static int analyze_elf(char **filenames, sd_json_format_flags_t json_flags) { if (sd_json_format_enabled(json_flags)) sd_json_variant_dump(package_metadata, json_flags, stdout, NULL); else { - r = table_print(t, NULL); + r = table_print(t); if (r < 0) return table_log_print_error(r); } diff --git a/src/analyze/analyze-plot.c b/src/analyze/analyze-plot.c index 8460757b8ac..7f92c1c6bb2 100644 --- a/src/analyze/analyze-plot.c +++ b/src/analyze/analyze-plot.c @@ -429,7 +429,7 @@ static int show_table(Table *table, const char *word) { if (sd_json_format_enabled(arg_json_format_flags)) r = table_print_json(table, NULL, arg_json_format_flags | SD_JSON_FORMAT_COLOR_AUTO); else - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); } diff --git a/src/analyze/analyze-timespan.c b/src/analyze/analyze-timespan.c index fb077617d47..b6ca7bb4af4 100644 --- a/src/analyze/analyze-timespan.c +++ b/src/analyze/analyze-timespan.c @@ -55,7 +55,7 @@ int verb_timespan(int argc, char *argv[], uintptr_t _data, void *userdata) { if (r < 0) return table_log_add_error(r); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return r; diff --git a/src/analyze/analyze-timestamp.c b/src/analyze/analyze-timestamp.c index e7ba6e1bcc1..d998ca830a2 100644 --- a/src/analyze/analyze-timestamp.c +++ b/src/analyze/analyze-timestamp.c @@ -73,7 +73,7 @@ static int test_timestamp_one(const char *p) { if (r < 0) return table_log_add_error(r); - return table_print(table, NULL); + return table_print(table); } int verb_timestamp(int argc, char *argv[], uintptr_t _data, void *userdata) { diff --git a/src/ask-password/ask-password.c b/src/ask-password/ask-password.c index 2c032c1afbc..2ed2be8afee 100644 --- a/src/ask-password/ask-password.c +++ b/src/ask-password/ask-password.c @@ -57,7 +57,7 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c index 23c09fe3496..06fff811bfb 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -126,7 +126,7 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/bless-boot/bless-boot.c b/src/bless-boot/bless-boot.c index b82be92dbdf..67da021f296 100644 --- a/src/bless-boot/bless-boot.c +++ b/src/bless-boot/bless-boot.c @@ -58,10 +58,10 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(verbs, stdout); + table_print(verbs); printf("\nOptions:\n"); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/cryptenroll/cryptenroll-list.c b/src/cryptenroll/cryptenroll-list.c index 32e8c9cf2a3..bf9f2a130e9 100644 --- a/src/cryptenroll/cryptenroll-list.c +++ b/src/cryptenroll/cryptenroll-list.c @@ -125,7 +125,7 @@ int list_enrolled(struct crypt_device *cd) { return 0; } - r = table_print(t, stdout); + r = table_print(t); if (r < 0) return log_error_errno(r, "Failed to show slot table: %m"); diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c index 912f6fbdd67..a8b9739a925 100644 --- a/src/detect-virt/detect-virt.c +++ b/src/detect-virt/detect-virt.c @@ -41,7 +41,7 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index 26fa1aa1a38..91ad3a45026 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -165,11 +165,11 @@ static int help(void) { ansi_underline(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\n%sCommands:%s\n", ansi_underline(), ansi_normal()); - table_print(commands, stdout); + table_print(commands); printf("\nSee the %s for details.\n", link); return 0; @@ -1082,7 +1082,7 @@ static int action_dissect( if (!sd_json_format_enabled(arg_json_format_flags)) { table_set_header(t, arg_legend); - r = table_print(t, NULL); + r = table_print(t); if (r < 0) return table_log_print_error(r); } else { diff --git a/src/factory-reset/factory-reset-tool.c b/src/factory-reset/factory-reset-tool.c index e7eabd8757b..c09369e2293 100644 --- a/src/factory-reset/factory-reset-tool.c +++ b/src/factory-reset/factory-reset-tool.c @@ -51,10 +51,10 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(verbs, stdout); + table_print(verbs); printf("\nOptions:\n"); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index 52fa3319d70..52b31a58679 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -375,7 +375,7 @@ static int print_status_info(StatusInfo *i) { } } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -748,10 +748,10 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(verbs, stdout); + table_print(verbs); printf("\nOptions:\n"); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/id128/id128.c b/src/id128/id128.c index f23403b3f81..eda117aec0c 100644 --- a/src/id128/id128.c +++ b/src/id128/id128.c @@ -216,10 +216,10 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(verbs, stdout); + table_print(verbs); printf("\nOptions:\n"); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/imds/imds-tool.c b/src/imds/imds-tool.c index 4ae8dbb33ce..61fc82014e8 100644 --- a/src/imds/imds-tool.c +++ b/src/imds/imds-tool.c @@ -381,7 +381,7 @@ static int action_summary(sd_varlink *link) { if (table_isempty(table)) return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "No well-known IMDS data available."); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/locale/localectl.c b/src/locale/localectl.c index 65756d26f0d..b67a67e73b7 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -144,7 +144,7 @@ static int print_status_info(StatusInfo *i) { return table_log_add_error(r); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/login/loginctl.c b/src/login/loginctl.c index a921a4a6771..fa1c0244812 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -716,7 +716,7 @@ static int print_session_status_info(sd_bus *bus, const char *path) { /* We don't use the table to show the header, in order to make the width of the column stable. */ printf("%s%s - %s (" UID_FMT ")%s\n", ansi_highlight(), i.id, i.name, i.uid, ansi_normal()); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -821,7 +821,7 @@ static int print_user_status_info(sd_bus *bus, const char *path) { printf("%s%s (" UID_FMT ")%s\n", ansi_highlight(), i.name, i.uid, ansi_normal()); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -896,7 +896,7 @@ static int print_seat_status_info(sd_bus *bus, const char *path) { printf("%s%s%s\n", ansi_highlight(), i.id, ansi_normal()); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 733b1a19ef1..6c684149cb9 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -262,7 +262,7 @@ static int show_table(Table *table, const char *word) { if (OUTPUT_MODE_IS_JSON(arg_output)) r = table_print_json(table, NULL, output_mode_to_json_format_flags(arg_output) | SD_JSON_FORMAT_COLOR_AUTO); else - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); } diff --git a/src/network/networkctl-address-label.c b/src/network/networkctl-address-label.c index f587d0cfbb5..04b6d4d2366 100644 --- a/src/network/networkctl-address-label.c +++ b/src/network/networkctl-address-label.c @@ -82,7 +82,7 @@ static int dump_address_labels(sd_netlink *rtnl) { return table_log_add_error(r); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/network/networkctl-list.c b/src/network/networkctl-list.c index 1ef38a0b854..c30be4a1dee 100644 --- a/src/network/networkctl-list.c +++ b/src/network/networkctl-list.c @@ -79,7 +79,7 @@ int verb_list_links(int argc, char *argv[], uintptr_t _data, void *userdata) { return table_log_add_error(r); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/network/networkctl-lldp.c b/src/network/networkctl-lldp.c index ddce26e5c42..c91d8fea007 100644 --- a/src/network/networkctl-lldp.c +++ b/src/network/networkctl-lldp.c @@ -303,7 +303,7 @@ int verb_link_lldp_status(int argc, char *argv[], uintptr_t _data, void *userdat } } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/network/networkctl-status-link.c b/src/network/networkctl-status-link.c index f63ee2d4175..9cbf3efb332 100644 --- a/src/network/networkctl-status-link.c +++ b/src/network/networkctl-status-link.c @@ -900,7 +900,7 @@ static int link_status_one( on_color_operational, glyph(GLYPH_BLACK_CIRCLE), off_color_operational, info->ifindex, info->name); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/network/networkctl-status-system.c b/src/network/networkctl-status-system.c index 20a4c2be918..ce403d60624 100644 --- a/src/network/networkctl-status-system.c +++ b/src/network/networkctl-status-system.c @@ -126,7 +126,7 @@ int system_status(sd_netlink *rtnl, sd_hwdb *hwdb) { on_color_operational, glyph(GLYPH_BLACK_CIRCLE), off_color_operational, strna(netifs_joined)); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/notify/notify.c b/src/notify/notify.c index a06f5ce7734..e425a125ac3 100644 --- a/src/notify/notify.c +++ b/src/notify/notify.c @@ -77,7 +77,7 @@ static int help(void) { ansi_highlight(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 0cd461a997e..f5ce3db9c41 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -1075,7 +1075,7 @@ static int verb_list_images(int argc, char *argv[], uintptr_t _data, void *userd table_set_header(table, arg_legend); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); } diff --git a/src/report/report-basic-server.c b/src/report/report-basic-server.c index 32ec9b03560..dc482a37ff0 100644 --- a/src/report/report-basic-server.c +++ b/src/report/report-basic-server.c @@ -47,7 +47,7 @@ static int help(void) { ansi_normal(), ansi_underline(), ansi_normal()); - table_print(options, stdout); + table_print(options); return 0; } diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index e4705a6bccc..fe2b676c7c0 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -1321,7 +1321,7 @@ static int verb_show_statistics(int argc, char *argv[], uintptr_t _data, void *u if (r < 0) return table_log_add_error(r); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -1890,7 +1890,7 @@ static int print_configuration(DNSConfiguration *configuration, StatusMode mode, return table_log_add_error(r); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -3097,7 +3097,7 @@ static int dump_server_state(sd_json_variant *server) { if (r < 0) return table_log_add_error(r); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/run/run.c b/src/run/run.c index f1bbbe1f393..88a9f41d69a 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -2437,7 +2437,7 @@ static int run_context_show_result(RunContext *c) { return table_log_add_error(r); } - r = table_print(t, stderr); + r = table_print_full(t, stderr, /* flush= */ true); if (r < 0) return table_log_print_error(r); diff --git a/src/shared/format-table.c b/src/shared/format-table.c index 04552b5b567..718d5c09b86 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c @@ -2217,7 +2217,7 @@ int _table_sync_column_widths(size_t column, Table *a, ...) { return r; } -int table_print(Table *t, FILE *f) { +int table_print_full(Table *t, FILE *f, bool flush) { size_t n_rows, *minimum_width, *maximum_width, display_columns, *requested_width, table_minimum_width, table_maximum_width, table_requested_width, table_effective_width, *width = NULL; @@ -2637,6 +2637,9 @@ int table_print(Table *t, FILE *f) { } while (more_sublines); } + if (!flush) + return 0; + return fflush_and_check(f); } @@ -2652,7 +2655,7 @@ int table_format(Table *t, char **ret) { if (!f) return -ENOMEM; - r = table_print(t, f); + r = table_print_full(t, f, /* flush= */ true); if (r < 0) return r; @@ -3141,7 +3144,7 @@ int table_print_json(Table *t, FILE *f, sd_json_format_flags_t flags) { assert(t); if (!sd_json_format_enabled(flags)) /* If JSON output is turned off, use regular output */ - return table_print(t, f); + return table_print_full(t, f, /* flush= */ true); if (!f) f = stdout; diff --git a/src/shared/format-table.h b/src/shared/format-table.h index bb5a68b7e9f..ee4007394ef 100644 --- a/src/shared/format-table.h +++ b/src/shared/format-table.h @@ -147,7 +147,11 @@ int table_set_column_width(Table *t, size_t column, size_t width); int _table_sync_column_widths(size_t column, Table *a, ...); #define table_sync_column_widths(column, a, ...) _table_sync_column_widths(column, a, __VA_ARGS__, NULL) -int table_print(Table *t, FILE *f); +int table_print_full(Table *t, FILE *f, bool flush); +static inline int table_print(Table *t) { + return table_print_full(t, /* f= */ NULL, /* flush= */ false); +} + int table_format(Table *t, char **ret); static inline TableCell* TABLE_HEADER_CELL(size_t i) { diff --git a/src/shared/libfido2-util.c b/src/shared/libfido2-util.c index f4c8ad5c861..7e50d0dd2df 100644 --- a/src/shared/libfido2-util.c +++ b/src/shared/libfido2-util.c @@ -1241,7 +1241,7 @@ int fido2_list_devices(void) { } } - r = table_print(t, stdout); + r = table_print(t); if (r < 0) { log_error_errno(r, "Failed to show device table: %m"); goto finish; diff --git a/src/shared/parse-argument.c b/src/shared/parse-argument.c index 39e5328e703..6ac42c4d884 100644 --- a/src/shared/parse-argument.c +++ b/src/shared/parse-argument.c @@ -128,7 +128,7 @@ int parse_signal_argument(const char *s, int *ret) { return table_log_add_error(r); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/shared/pkcs11-util.c b/src/shared/pkcs11-util.c index 1fa0d77d6d0..2d8ce29b580 100644 --- a/src/shared/pkcs11-util.c +++ b/src/shared/pkcs11-util.c @@ -1816,7 +1816,7 @@ int pkcs11_list_tokens(void) { return 0; } - r = table_print(t, stdout); + r = table_print(t); if (r < 0) return log_error_errno(r, "Failed to show device table: %m"); diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index dc062117b41..a1f05d6397c 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -6584,7 +6584,7 @@ int tpm2_list_devices(bool legend, bool quiet) { return 0; } - r = table_print(t, stdout); + r = table_print(t); if (r < 0) return log_error_errno(r, "Failed to show device table: %m"); diff --git a/src/systemctl/systemctl-list-jobs.c b/src/systemctl/systemctl-list-jobs.c index 5804d32518c..bf3f5ed8662 100644 --- a/src/systemctl/systemctl-list-jobs.c +++ b/src/systemctl/systemctl-list-jobs.c @@ -115,7 +115,7 @@ static int output_jobs_list(sd_bus *bus, const struct job_info* jobs, unsigned n output_waiting_jobs(bus, table, j->id, "GetJobBefore", "\twaiting for job"); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return log_error_errno(r, "Failed to print the table: %m"); diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c index ef7bce9e7f1..b278f784ba3 100644 --- a/src/systemctl/systemctl-util.c +++ b/src/systemctl/systemctl-util.c @@ -919,7 +919,7 @@ int output_table(Table *table) { if (OUTPUT_MODE_IS_JSON(arg_output)) r = table_print_json(table, NULL, output_mode_to_json_format_flags(arg_output) | SD_JSON_FORMAT_COLOR_AUTO); else - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/test/test-format-table.c b/src/test/test-format-table.c index 4305f77224e..677adaa9c96 100644 --- a/src/test/test-format-table.c +++ b/src/test/test-format-table.c @@ -890,7 +890,7 @@ TEST(table_ansi) { "FOO BAR BAZ KKK\n" "hallo knuerzredgreen noansi thisisgrey\n"); - ASSERT_OK(table_print(table, /* f= */ NULL)); + ASSERT_OK(table_print(table)); _cleanup_(sd_json_variant_unrefp) sd_json_variant *j = NULL, *jj = NULL; diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index cec4363affb..93a5dd6da35 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -163,7 +163,7 @@ static int print_status_info(const StatusInfo *i) { if (r < 0) return table_log_add_error(r); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -443,7 +443,7 @@ static int print_ntp_status_info(NTPStatusInfo *i) { if (r < 0) return table_log_add_error(r); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -452,7 +452,7 @@ static int print_ntp_status_info(NTPStatusInfo *i) { if (i->dest < i->origin || i->trans < i->recv || i->dest - i->origin < i->trans - i->recv) { log_error("Invalid NTP response"); - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); @@ -536,7 +536,7 @@ static int print_ntp_status_info(NTPStatusInfo *i) { return table_log_add_error(r); } - r = table_print(table, NULL); + r = table_print(table); if (r < 0) return table_log_print_error(r); diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c index b3c45c352b9..f076f263a68 100644 --- a/src/update-done/update-done.c +++ b/src/update-done/update-done.c @@ -82,7 +82,7 @@ static int help(void) { ansi_normal(), ansi_underline(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/validatefs/validatefs.c b/src/validatefs/validatefs.c index 9645fd187fe..0608a148952 100644 --- a/src/validatefs/validatefs.c +++ b/src/validatefs/validatefs.c @@ -50,7 +50,7 @@ static int help(void) { program_invocation_short_name, ansi_highlight(), ansi_normal()); - table_print(options, stdout); + table_print(options); printf("\nSee the %s for details.\n", link); return 0; diff --git a/src/varlinkctl/varlinkctl.c b/src/varlinkctl/varlinkctl.c index c2cdd52b89e..2d610db4e55 100644 --- a/src/varlinkctl/varlinkctl.c +++ b/src/varlinkctl/varlinkctl.c @@ -439,7 +439,7 @@ static int verb_info(int argc, char *argv[], uintptr_t _data, void *userdata) { if (r < 0) return table_log_add_error(r); - r = table_print(t, NULL); + r = table_print(t); if (r < 0) return table_log_print_error(r); } diff --git a/src/vpick/vpick-tool.c b/src/vpick/vpick-tool.c index c20994d115d..1f3277da45e 100644 --- a/src/vpick/vpick-tool.c +++ b/src/vpick/vpick-tool.c @@ -337,7 +337,7 @@ static int run(int argc, char *argv[]) { return table_log_add_error(r); } - r = table_print(t, stdout); + r = table_print(t); if (r < 0) return table_log_print_error(r);