summaryrefslogtreecommitdiff
path: root/tests/stdio-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdio-write.c')
-rw-r--r--tests/stdio-write.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/stdio-write.c b/tests/stdio-write.c
index 59ba8fc4..fc7f74fe 100644
--- a/tests/stdio-write.c
+++ b/tests/stdio-write.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream write function.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
@@ -107,10 +107,9 @@
return (EXPRESSION); \
else \
{ \
- RETTYPE ret; \
CLEAR_ERRNO \
CLEAR_LastError \
- ret = (EXPRESSION); \
+ RETTYPE ret = (EXPRESSION); \
if (FAILED) \
{ \
HANDLE_ENOSPC \
@@ -124,11 +123,9 @@
int
printf (const char *format, ...)
{
- int retval;
va_list args;
-
va_start (args, format);
- retval = vfprintf (stdout, format, args);
+ int retval = vfprintf (stdout, format, args);
va_end (args);
return retval;
@@ -139,11 +136,9 @@ printf (const char *format, ...)
int
fprintf (FILE *stream, const char *format, ...)
{
- int retval;
va_list args;
-
va_start (args, format);
- retval = vfprintf (stream, format, args);
+ int retval = vfprintf (stream, format, args);
va_end (args);
return retval;