From 142f466993cf400a35300c83d19c053fae077a5b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 3 Apr 2023 14:45:06 +0200 Subject: [PATCH] vasnprintf-posix: Fix harmless mistake (regression 2023-03-24). Found by Coverity. * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement. --- ChangeLog | 6 ++++++ lib/vasnprintf.c | 1 + 2 files changed, 7 insertions(+) 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 -- 2.39.5