aboutsummaryrefslogtreecommitdiffstats
path: root/man3/strdup.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2013-04-19 10:12:26 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2013-04-19 14:19:01 +0200
commit6a7883104f8a2912d0cfb58ef9fda7d3ec8c4386 (patch)
tree4449a26a2bf63fe2d33e19359d0c2626155f351d /man3/strdup.3
parent72cc8811baf82825953f5a5169a9a4d323e62e09 (diff)
downloadman-pages-6a7883104f8a2912d0cfb58ef9fda7d3ec8c4386.tar.gz
strdup.3: RETURN VALUE: mention that 'errno' is set on error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/strdup.3')
-rw-r--r--man3/strdup.39
1 files changed, 6 insertions, 3 deletions
diff --git a/man3/strdup.3 b/man3/strdup.3
index 67a0f54718..9b3a4c0f5b 100644
--- a/man3/strdup.3
+++ b/man3/strdup.3
@@ -28,7 +28,7 @@
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:41:34 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Wed Oct 17 01:12:26 2001 by John Levon <moz@compsoc.man.ac.uk>
-.TH STRDUP 3 2012-05-10 "GNU" "Linux Programmer's Manual"
+.TH STRDUP 3 2013-04-19 "GNU" "Linux Programmer's Manual"
.SH NAME
strdup, strndup, strdupa, strndupa \- duplicate a string
.SH SYNOPSIS
@@ -102,10 +102,13 @@ They are available only when using the GNU
GCC suite, and suffer from the same limitations described in
.BR alloca (3).
.SH RETURN VALUE
-The
+On success, the
.BR strdup ()
function returns a pointer to the duplicated
-string, or NULL if insufficient memory was available.
+string.
+It returns NULL if insufficient memory was available, with
+.I errno
+set to indicate the cause of the error.
.SH ERRORS
.TP
.B ENOMEM