diff options
Diffstat (limited to 'text-utils/col.c')
-rw-r--r-- | text-utils/col.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/text-utils/col.c b/text-utils/col.c index 56ccec9..f9bc3be 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -182,10 +182,10 @@ static void __attribute__((__noreturn__)) usage(void) " -x, --spaces convert tabs to spaces\n" " -l, --lines NUM buffer at least NUM lines\n" )); - printf( " -H, --help %s\n", USAGE_OPTSTR_HELP); - printf( " -V, --version %s\n", USAGE_OPTSTR_VERSION); + fprintf(out, " -H, --help %s\n", USAGE_OPTSTR_HELP); + fprintf(out, " -V, --version %s\n", USAGE_OPTSTR_VERSION); - printf(USAGE_MAN_TAIL("col(1)")); + fprintf(out, USAGE_MAN_TAIL("col(1)")); exit(EXIT_SUCCESS); } @@ -244,11 +244,11 @@ static void flush_line(struct col_ctl *ctl, struct col_line *l) */ if (sorted_size < l->l_lsize) { sorted_size = l->l_lsize; - sorted = xrealloc(sorted, sizeof(struct col_char) * sorted_size); + sorted = xreallocarray(sorted, sorted_size, sizeof(struct col_char)); } if (count_size <= l->l_max_col) { count_size = l->l_max_col + 1; - count = xrealloc(count, sizeof(size_t) * count_size); + count = xreallocarray(count, count_size, sizeof(size_t)); } memset(count, 0, sizeof(size_t) * l->l_max_col + 1); for (i = nchars, c = l->l_line; c && 0 < i; i--, c++) |