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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user