diff options
author | lum <> | 2011-12-08 08:06:19 +0000 |
---|---|---|
committer | lum <> | 2011-12-08 08:06:19 +0000 |
commit | 4735b8de4618d751a856f2d60d6bc93cec885b6b (patch) | |
tree | 821df70f3c86978fac84bb25ee50af4d25c71d8b | |
parent | 908a066f5e18897512f62a86c739a18de54cc548 (diff) | |
download | openbsd-4735b8de4618d751a856f2d60d6bc93cec885b6b.tar.gz openbsd-4735b8de4618d751a856f2d60d6bc93cec885b6b.tar.bz2 openbsd-4735b8de4618d751a856f2d60d6bc93cec885b6b.zip |
strdup and strndup both use malloc. Make this fact explicit.
ok jmc@
-rw-r--r-- | src/lib/libc/string/strdup.3 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libc/string/strdup.3 b/src/lib/libc/string/strdup.3 index 02d5666a9c..45a7bd1826 100644 --- a/src/lib/libc/string/strdup.3 +++ b/src/lib/libc/string/strdup.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: strdup.3,v 1.18 2011/07/25 00:38:53 schwarze Exp $ | 1 | .\" $OpenBSD: strdup.3,v 1.19 2011/12/08 08:06:19 lum Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1990, 1991, 1993 | 3 | .\" Copyright (c) 1990, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -29,7 +29,7 @@ | |||
29 | .\" | 29 | .\" |
30 | .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 | 30 | .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: July 25 2011 $ | 32 | .Dd $Mdocdate: December 8 2011 $ |
33 | .Dt STRDUP 3 | 33 | .Dt STRDUP 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -79,7 +79,9 @@ if (p == NULL) | |||
79 | .Sh ERRORS | 79 | .Sh ERRORS |
80 | The | 80 | The |
81 | .Fn strdup | 81 | .Fn strdup |
82 | function may fail and set the external variable | 82 | and |
83 | .Fn strndup | ||
84 | functions may fail and set the external variable | ||
83 | .Va errno | 85 | .Va errno |
84 | for any of the errors specified for the library function | 86 | for any of the errors specified for the library function |
85 | .Xr malloc 3 . | 87 | .Xr malloc 3 . |