From 8bb05ac73a5b448b339ce0bc8d396c82c459b47f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:32 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- term-utils/script.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'term-utils/script.c') diff --git a/term-utils/script.c b/term-utils/script.c index 7752c29..3457ac8 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -216,8 +216,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -q, --quiet be quiet\n"), out); fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(31)); - printf(USAGE_MAN_TAIL("script(1)")); + fprintf(out, USAGE_HELP_OPTIONS(31)); + fprintf(out, USAGE_MAN_TAIL("script(1)")); exit(EXIT_SUCCESS); } @@ -260,8 +260,8 @@ static struct script_log *log_associate(struct script_control *ctl, } /* add log to the stream */ - stream->logs = xrealloc(stream->logs, - (stream->nlogs + 1) * sizeof(log)); + stream->logs = xreallocarray(stream->logs, + stream->nlogs + 1, sizeof(log)); stream->logs[stream->nlogs] = log; stream->nlogs++; -- cgit v1.2.3