summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorguenther <>2014-04-21 08:46:59 +0000
committerguenther <>2014-04-21 08:46:59 +0000
commit2136a925bd7596118fa98134cae7dd4a5edfbed8 (patch)
treedcf2107ac4483aba42021dcc1b8152cee7fde9ac /src/lib
parentaf50ddfc8cd7409b6577826223496779c69cd1e0 (diff)
downloadopenbsd-2136a925bd7596118fa98134cae7dd4a5edfbed8.tar.gz
openbsd-2136a925bd7596118fa98134cae7dd4a5edfbed8.tar.bz2
openbsd-2136a925bd7596118fa98134cae7dd4a5edfbed8.zip
Correctly document the return value of getenv(3)
From Ben Cornett (ben (at) lantern.is)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/stdlib/getenv.314
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/libc/stdlib/getenv.3 b/src/lib/libc/stdlib/getenv.3
index 5239d1b0d5..2333559516 100644
--- a/src/lib/libc/stdlib/getenv.3
+++ b/src/lib/libc/stdlib/getenv.3
@@ -29,9 +29,9 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: getenv.3,v 1.19 2013/06/05 03:39:23 tedu Exp $ 32.\" $OpenBSD: getenv.3,v 1.20 2014/04/21 08:46:59 guenther Exp $
33.\" 33.\"
34.Dd $Mdocdate: June 5 2013 $ 34.Dd $Mdocdate: April 21 2014 $
35.Dt GETENV 3 35.Dt GETENV 3
36.Os 36.Os
37.Sh NAME 37.Sh NAME
@@ -102,11 +102,13 @@ function deletes all instances of the variable name pointed to by
102.Fa name 102.Fa name
103from the list. 103from the list.
104.Sh RETURN VALUES 104.Sh RETURN VALUES
105These functions 105.Rv -std putenv setenv unsetenv
106return zero if successful; otherwise the global variable
107.Va errno
108is set to indicate the error and \-1 is returned.
109.Pp 106.Pp
107The
108.Fn getenv
109function returns a pointer to the requested value, or
110.Dv NULL
111if it could not be found.
110If 112If
111.Fn getenv 113.Fn getenv
112is successful, the string returned should be considered read-only. 114is successful, the string returned should be considered read-only.