summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/string/strdup.37
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libc/string/strdup.3 b/src/lib/libc/string/strdup.3
index 5ef38e38f3..60a7462777 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.14 2007/05/31 19:19:32 jmc Exp $ 1.\" $OpenBSD: strdup.3,v 1.15 2010/03/24 14:47:46 kettenis 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: May 31 2007 $ 32.Dd $Mdocdate: March 24 2010 $
33.Dt STRDUP 3 33.Dt STRDUP 3
34.Os 34.Os
35.Sh NAME 35.Sh NAME
@@ -59,7 +59,8 @@ to an allocated area of memory containing the NUL-terminated string
59.Bd -literal -offset indent 59.Bd -literal -offset indent
60char *p; 60char *p;
61 61
62if ((p = strdup("foobar")) == NULL) { 62p = strdup("foobar");
63if (p == NULL) {
63 fprintf(stderr, "Out of memory.\en"); 64 fprintf(stderr, "Out of memory.\en");
64 exit(1); 65 exit(1);
65} 66}