summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strdup.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/strdup.3')
-rw-r--r--lib/libc/string/strdup.37
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/string/strdup.3 b/lib/libc/string/strdup.3
index 5ef38e38f3e..60a74627771 100644
--- a/lib/libc/string/strdup.3
+++ b/lib/libc/string/strdup.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strdup.3,v 1.14 2007/05/31 19:19:32 jmc Exp $
+.\" $OpenBSD: strdup.3,v 1.15 2010/03/24 14:47:46 kettenis Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)strdup.3 8.1 (Berkeley) 6/9/93
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: March 24 2010 $
.Dt STRDUP 3
.Os
.Sh NAME
@@ -59,7 +59,8 @@ to an allocated area of memory containing the NUL-terminated string
.Bd -literal -offset indent
char *p;
-if ((p = strdup("foobar")) == NULL) {
+p = strdup("foobar");
+if (p == NULL) {
fprintf(stderr, "Out of memory.\en");
exit(1);
}