summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-04-21 08:46:59 +0000
committerguenther <guenther@openbsd.org>2014-04-21 08:46:59 +0000
commiteb15c8a0d4ebd367e5b3e29df4ca5c0336bb4ce0 (patch)
tree41fa4da92dd2b68068c88e29363c88cc3fa389dd /lib/libc/stdlib
parentBye bye *hosts.equiv. (diff)
downloadwireguard-openbsd-eb15c8a0d4ebd367e5b3e29df4ca5c0336bb4ce0.tar.xz
wireguard-openbsd-eb15c8a0d4ebd367e5b3e29df4ca5c0336bb4ce0.zip
Correctly document the return value of getenv(3)
From Ben Cornett (ben (at) lantern.is)
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/getenv.314
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3
index 5239d1b0d5c..23335595161 100644
--- a/lib/libc/stdlib/getenv.3
+++ b/lib/libc/stdlib/getenv.3
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: getenv.3,v 1.19 2013/06/05 03:39:23 tedu Exp $
+.\" $OpenBSD: getenv.3,v 1.20 2014/04/21 08:46:59 guenther Exp $
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: April 21 2014 $
.Dt GETENV 3
.Os
.Sh NAME
@@ -102,11 +102,13 @@ function deletes all instances of the variable name pointed to by
.Fa name
from the list.
.Sh RETURN VALUES
-These functions
-return zero if successful; otherwise the global variable
-.Va errno
-is set to indicate the error and \-1 is returned.
+.Rv -std putenv setenv unsetenv
.Pp
+The
+.Fn getenv
+function returns a pointer to the requested value, or
+.Dv NULL
+if it could not be found.
If
.Fn getenv
is successful, the string returned should be considered read-only.