Browse Source

strdup and strndup both use malloc. Make this fact explicit.

ok jmc@
OPENBSD_5_1
lum 13 years ago
parent
commit
85192fb304
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/lib/libc/string/strdup.3

+ 5
- 3
src/lib/libc/string/strdup.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: strdup.3,v 1.18 2011/07/25 00:38:53 schwarze Exp $
.\" $OpenBSD: strdup.3,v 1.19 2011/12/08 08:06:19 lum Exp $
.\" .\"
.\" Copyright (c) 1990, 1991, 1993 .\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\" .\"
.\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93
.\" .\"
.Dd $Mdocdate: July 25 2011 $
.Dd $Mdocdate: December 8 2011 $
.Dt STRDUP 3 .Dt STRDUP 3
.Os .Os
.Sh NAME .Sh NAME
@ -79,7 +79,9 @@ if (p == NULL)
.Sh ERRORS .Sh ERRORS
The The
.Fn strdup .Fn strdup
function may fail and set the external variable
and
.Fn strndup
functions may fail and set the external variable
.Va errno .Va errno
for any of the errors specified for the library function for any of the errors specified for the library function
.Xr malloc 3 . .Xr malloc 3 .


Loading…
Cancel
Save