strdup.3: RETURN VALUE: mention that 'errno' is set on error

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-04-19 10:12:26 +02:00
parent 72cc8811ba
commit 6a7883104f
1 changed files with 6 additions and 3 deletions

View File

@ -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