diff options
author | Jeremy Baxter <jtbx@disroot.org> | 2024-03-15 14:07:14 +1300 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2024-03-16 00:29:06 +0100 |
commit | e0fc7ee5e3d664c83bd0f4fc751ef80cf38ae1bc (patch) | |
tree | 5210af6648c454cf297e277c18b6ad162dbb4022 | |
parent | d94643e0639a8a5a661182a9bb45f924ba2d4aad (diff) |
printf.3: Return the number of bytes printed, not characters
From <https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html>:
Upon successful completion, the dprintf(), fprintf(), and printf()
functions shall return the number of bytes transmitted.
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218600>
Reported-by: <quirin.blaeser@freenet.de>
Signed-off-by: Jeremy Baxter <jtbx@disroot.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r-- | man3/printf.3 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/man3/printf.3 b/man3/printf.3 index eb152aa19..15ed75439 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -875,7 +875,7 @@ No argument is converted. The complete conversion specification is \[aq]%%\[aq]. .SH RETURN VALUE -Upon successful return, these functions return the number of characters +Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings). .P The functions |