[glibc] stdio-common: Restore while (1) loop in printf_positional
Florian Weimer via Glibc-cvs <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b589bd672c529cf264dc6dfdfa11f73c7e4e1666 commit b589bd672c529cf264dc6dfdfa11f73c7e4e1666 Author: Florian Weimer <[email protected]> Date: Mon Aug 10 14:53:31 2026 +0200 stdio-common: Restore while (1) loop in printf_positional The old condition is misleading because it is never evaluated. Switch back to the original approach before the printf buffer rewrite. Diff: --- stdio-common/vfprintf-internal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stdio-common/vfprintf-internal.c b/stdio-common/vfprintf-internal.c index 14ac0d9762..38a55443eb 100644 --- a/stdio-common/vfprintf-internal.c +++ b/stdio-common/vfprintf-internal.c @@ -1335,7 +1335,7 @@ printf_positional (struct Xprintf_buffer * buf, const CHAR_T *format, } /* Process format specifiers. */ - do + while (1) { # ifdef COMPILE_WPRINTF # define CHECK_SPEC(spec) ((spec) <= UCHAR_MAX) @@ -1415,7 +1415,6 @@ printf_positional (struct Xprintf_buffer * buf, const CHAR_T *format, } break; } - while (Xprintf_buffer_has_failed (buf)); /* Write the following constant string. */ Xprintf_buffer_write (buf,