diff options
| author | guenther <> | 2014-04-21 08:46:59 +0000 |
|---|---|---|
| committer | guenther <> | 2014-04-21 08:46:59 +0000 |
| commit | 2b7ae4a5fbadf275938d31cd29a2d8e4683af474 (patch) | |
| tree | dcf2107ac4483aba42021dcc1b8152cee7fde9ac /src/lib/libc/stdlib/getenv.3 | |
| parent | df671478b8d164955b805c7a18e850cbf4fdcf57 (diff) | |
| download | openbsd-2b7ae4a5fbadf275938d31cd29a2d8e4683af474.tar.gz openbsd-2b7ae4a5fbadf275938d31cd29a2d8e4683af474.tar.bz2 openbsd-2b7ae4a5fbadf275938d31cd29a2d8e4683af474.zip | |
Correctly document the return value of getenv(3)
From Ben Cornett (ben (at) lantern.is)
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/getenv.3 | 14 |
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 |
| 103 | from the list. | 103 | from the list. |
| 104 | .Sh RETURN VALUES | 104 | .Sh RETURN VALUES |
| 105 | These functions | 105 | .Rv -std putenv setenv unsetenv |
| 106 | return zero if successful; otherwise the global variable | ||
| 107 | .Va errno | ||
| 108 | is set to indicate the error and \-1 is returned. | ||
| 109 | .Pp | 106 | .Pp |
| 107 | The | ||
| 108 | .Fn getenv | ||
| 109 | function returns a pointer to the requested value, or | ||
| 110 | .Dv NULL | ||
| 111 | if it could not be found. | ||
| 110 | If | 112 | If |
| 111 | .Fn getenv | 113 | .Fn getenv |
| 112 | is successful, the string returned should be considered read-only. | 114 | is successful, the string returned should be considered read-only. |
