[PATCH][next] powerpc/spufs: Replace snprintf() with the safer scnprintf() variant
Segher Boessenkool
segher at kernel.crashing.org
Sat Oct 19 02:38:43 AEDT 2024
On Fri, Oct 18, 2024 at 09:28:19PM +1300, Paulo Miguel Almeida wrote:
> The C99 standard specifies that {v}snprintf() returns the length of the
> data that *would have been* written if there were enough space.
Not including the trailing zero byte, and it can also return negative if
there was an encoding error. Yes.
Not that this matters at all for your patch, so why mention it?
Segher
More information about the Linuxppc-dev
mailing list