public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] getline.3: wfix
@ 2017-07-12  8:10 Long Wang
       [not found] ` <1499847001-83794-1-git-send-email-w-m92B/FuLcaEcWVvVuXF20w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Long Wang @ 2017-07-12  8:10 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Long Wang <w@laoqinren.net>
---
 man3/getline.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man3/getline.3 b/man3/getline.3
index 7483afd..9bc4d8e 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -173,7 +173,7 @@ main(int argc, char *argv[])
     ssize_t nread;
 
     if (argc != 2) {
-        fprintf(stderr, "Usage: %s <file>\en", argv[1]);
+        fprintf(stderr, "Usage: %s <file>\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
-- 
2.7.4



--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] getline.3: wfix.
@ 2022-07-29 20:22 enh
  2022-07-29 20:52 ` G. Branden Robinson
  2022-08-01 12:53 ` Alejandro Colomar
  0 siblings, 2 replies; 8+ messages in thread
From: enh @ 2022-07-29 20:22 UTC (permalink / raw)
  To: linux-man, Alejandro Colomar (man-pages),
	Michael Kerrisk (man-pages)

Clarify in the RETURN VALUE section that it's necessary to free the
buffer, since at least one person missed this up at the start of the
DESCRIPTION.

Signed-off-by: Elliott Hughes <enh@google.com>
---
 man3/getline.3 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/man3/getline.3 b/man3/getline.3
index 8b7357825..bad30956c 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -99,6 +99,10 @@ condition).
 In the event of a failure,
 .I errno
 is set to indicate the error.
+If
+.I "*lineptr"
+was set to NULL before the call, then the buffer should be freed by the
+user program even on failure.
 .SH ERRORS
 .TP
 .B EINVAL
-- 
2.37.1.455.g008518b4e5-goog

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-16  1:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12  8:10 [PATCH] getline.3: wfix Long Wang
     [not found] ` <1499847001-83794-1-git-send-email-w-m92B/FuLcaEcWVvVuXF20w@public.gmane.org>
2017-07-12 17:36   ` Michael Kerrisk (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2022-07-29 20:22 enh
2022-07-29 20:52 ` G. Branden Robinson
2022-07-29 20:55   ` enh
2022-08-01 12:53 ` Alejandro Colomar
2022-08-02 21:17   ` enh
2022-08-15 21:16     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox