diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:30 +0000 |
commit | c61e14d3a8412cd50d98aab604e607692c844c8a (patch) | |
tree | 4925aca0e6b64c8664ea2f3fdfa99a52dc93d5da /text-utils/col.c | |
parent | Adding upstream version 2.39.3. (diff) | |
download | util-linux-c61e14d3a8412cd50d98aab604e607692c844c8a.tar.xz util-linux-c61e14d3a8412cd50d98aab604e607692c844c8a.zip |
Adding upstream version 2.40.upstream/2.40
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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++) |