[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] misc: Make grub_vsnprintf C99/POSIX conformant
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] misc: Make grub_vsnprintf C99/POSIX conformant |
Date: |
Wed, 30 Aug 2023 16:43:06 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Fri, Aug 18, 2023 at 12:15:27PM -0500, Glenn Washburn wrote:
> To comply with C99 and POSIX standards, snprintf should return the
> number of bytes that would be written to the string (excluding the
> terminating NULL byte) if the buffer size was big enough. Before this
> change, the return value was the minimum of the standard return and
> the length of the buffer. Rarely is the return value of grub_snprintf
> or grub_vsnprintf used with current code, and the few places where it is
> used do not need to be changed.
>
> Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel