Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2012 20:30:40 GMT
From:      Paul Procacci <pprocacci@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/174023: [minor] getline(3) doc bug
Message-ID:  <201211302030.qAUKUe9C041465@red.freebsd.org>
Resent-Message-ID: <201211302040.qAUKe0Lv011919@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174023
>Category:       docs
>Synopsis:       [minor] getline(3) doc bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 20:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Paul Procacci
>Release:        8.3-RELEASE-p4
>Organization:
>Environment:
FreeBSD nat.myhome 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #4: Fri Jun 29 14:59:00 CDT 2012     root@nat.myhome:/usr/obj/usr/src/sys/FIREWALL  i386

>Description:
Really minor documentation bug in getline(3).  (Major if you want to confuse someone - hehe).

In the "Return Values" section of the manpage it says the call to either the getline and getdelim functions return the value of the number of characters _written_.

Certainly this should have been _read_.
>How-To-Repeat:
man getline
>Fix:
diff -u lib/libc/stdio/getline.3.orig lib/libc/stdio/getline.3
--- lib/libc/stdio/getline.3.orig       2012-11-30 14:26:08.000000000 -0600
+++ lib/libc/stdio/getline.3    2012-11-30 14:26:16.000000000 -0600
@@ -76,7 +76,7 @@
 .Fn getdelim
 and
 .Fn getline
-functions return the number of characters written, excluding the
+functions return the number of characters read, excluding the
 terminating
 .Dv NUL
 character.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211302030.qAUKUe9C041465>