From: Bruno Haible Date: Mon, 3 Apr 2023 12:45:06 +0000 (+0200) Subject: vasnprintf-posix: Fix harmless mistake (regression 2023-03-24). X-Git-Tag: v1.0~1521 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=142f466993cf400a35300c83d19c053fae077a5b;p=gnulib.git vasnprintf-posix: Fix harmless mistake (regression 2023-03-24). Found by Coverity. * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement. --- diff --git a/ChangeLog b/ChangeLog index 5c916c133b..ae851ed8aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-04-03 Bruno Haible + + 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 mbstoc32s tests: Check behaviour in the C locale. diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 111d898a94..6eb056d0e9 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -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