diff options
author | mike <mike@FreeBSD.org> | 2001-09-23 00:37:42 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2001-09-23 00:37:42 +0000 |
commit | 393333febcecdc8049bd3c7c6f9aac75c3563226 (patch) | |
tree | 0e2a5078592d928f200d3c824f0a75d96ecbd9c9 /lib/libc/string/strdup.3 | |
parent | b5432869303b965254810833060326a47e9bb48f (diff) | |
download | FreeBSD-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/strdup.3')
-rw-r--r-- | lib/libc/string/strdup.3 | 5 |
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 |