]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdio-common: Restore while (1) loop in printf_positional master
authorFlorian Weimer <fweimer@redhat.com>
Mon, 10 Aug 2026 12:53:31 +0000 (14:53 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 10 Aug 2026 14:10:34 +0000 (16:10 +0200)
The old condition is misleading because it is never evaluated.
Switch back to the original approach before the printf buffer
rewrite.

stdio-common/vfprintf-internal.c

index 14ac0d97625297fc25989e741b98f15cd9c1b6ed..38a55443eb6df1808c660d1797be0abe12116185 100644 (file)
@@ -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,