]> Savannah Git Hosting - gnulib.git/commitdiff
vasnprintf-posix: Fix harmless mistake (regression 2023-03-24).
authorBruno Haible <bruno@clisp.org>
Mon, 3 Apr 2023 12:45:06 +0000 (14:45 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 3 Apr 2023 12:45:06 +0000 (14:45 +0200)
Found by Coverity.

* lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.

ChangeLog
lib/vasnprintf.c

index 5c916c133bcdc28fa40a0e62239d8f9bc6184aad..ae851ed8aaa641f4774c33df5dca3870d7a15d4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-03  Bruno Haible  <bruno@clisp.org>
+
+       vasnprintf-posix: Fix harmless mistake (regression 2023-03-24).
+       Found by Coverity.
+       * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.
+
 2023-04-03  Bruno Haible  <bruno@clisp.org>
 
        mbstoc32s tests: Check behaviour in the C locale.
index 111d898a94de23d91201d2a7d012b30dcd4cd961..6eb056d0e99d66ef46e9cbc0ca2e0cadc3e7ebc4 100644 (file)
@@ -1641,6 +1641,7 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
                             * 0.30103 /* binary -> decimal */
                            )
             + 1; /* turn floor into ceil */
+          break;
         case TYPE_LONGINT:
           tmp_length =
             (unsigned int) (sizeof (long int) * CHAR_BIT