Linux-man Archive mirror
 help / color / mirror / Atom feed
From: "Jeremy Baxter" <jtbx@disroot.org>
To: "Alejandro Colomar" <alx@kernel.org>
Cc: <linux-man@vger.kernel.org>, <quirin.blaeser@freenet.de>
Subject: [PATCH] printf.3: Return the number of bytes printed, not characters
Date: Fri, 15 Mar 2024 14:07:14 +1300	[thread overview]
Message-ID: <CZTX6HB4IQ2Y.261V2LM2EIKZ9@disroot.org> (raw)

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.

Fixes bug 218600 <https://bugzilla.kernel.org/show_bug.cgi?id=218600>.

Signed-off-by: Jeremy Baxter <jtbx@disroot.org>
---
 man3/printf.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.44.0


             reply	other threads:[~2024-03-15  1:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  1:07 Jeremy Baxter [this message]
2024-03-15 23:34 ` [PATCH] printf.3: Return the number of bytes printed, not characters Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CZTX6HB4IQ2Y.261V2LM2EIKZ9@disroot.org \
    --to=jtbx@disroot.org \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=quirin.blaeser@freenet.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).