summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2001-09-23 00:37:42 +0000
committermike <mike@FreeBSD.org>2001-09-23 00:37:42 +0000
commit393333febcecdc8049bd3c7c6f9aac75c3563226 (patch)
tree0e2a5078592d928f200d3c824f0a75d96ecbd9c9 /lib/libc/string
parentb5432869303b965254810833060326a47e9bb48f (diff)
downloadFreeBSD-src-393333febcecdc8049bd3c7c6f9aac75c3563226.zip
FreeBSD-src-393333febcecdc8049bd3c7c6f9aac75c3563226.tar.gz
Note that strdup(3) will set errno if memory allocation fails. This
is also required by the forthcoming POSIX.1-200x standard. Obtained from: malloc.3
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/strdup.35
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/string/strdup.3 b/lib/libc/string/strdup.3
index a0139d3..c582a70 100644
--- a/lib/libc/string/strdup.3
+++ b/lib/libc/string/strdup.3
@@ -56,7 +56,10 @@ The pointer may subsequently be used as an
argument to the function
.Xr free 3 .
.Pp
-If insufficient memory is available, NULL is returned.
+If insufficient memory is available, NULL is returned and
+.Va errno
+is set to
+.Er ENOMEM .
.Sh SEE ALSO
.Xr free 3 ,
.Xr malloc 3
OpenPOWER on IntegriCloud