getline.3: Correct description of how '*n' is used when '*lineptr' == NULL

See https://sourceware.org/bugzilla/show_bug.cgi?id=5468

Reported-by: Luke Hutchison <luke.hutch@mit.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-01-08 10:02:50 +13:00
parent 9f0e82b451
commit ac16fdff8a
1 changed files with 4 additions and 5 deletions

View File

@ -23,7 +23,7 @@
.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
.TH GETLINE 3 2013-04-19 "GNU" "Linux Programmer's Manual"
.TH GETLINE 3 2014-01-08 "GNU" "Linux Programmer's Manual"
.SH NAME
getline, getdelim \- delimited string input
.SH SYNOPSIS
@ -65,13 +65,12 @@ one was found.
If
.I "*lineptr"
is NULL, then
is set to NULL and
.I *n
is set 0 before the call, then
.BR getline ()
will allocate a buffer for storing the line,
which should be freed by the user program.
(In this case, the value in
.I *n
is ignored.)
Alternatively, before calling
.BR getline (),