summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-07-05 19:01:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-07-05 19:01:32 +0000
commit616570c194a8f3b837797dba0ea926a8ede73205 (patch)
tree5bd5e166cdf6ff614935cc7703875721ccdc3059 /lib/libc
parentfa0f13c994037efb2120d5b1cb1c8b1cba5106bd (diff)
Fix some awful code in the example, pointed out by millert@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/wcsdup.36
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/string/wcsdup.3 b/lib/libc/string/wcsdup.3
index 37f82181eb9..4d29ac218fa 100644
--- a/lib/libc/string/wcsdup.3
+++ b/lib/libc/string/wcsdup.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wcsdup.3,v 1.1 2011/07/04 04:37:34 nicm Exp $
+.\" $OpenBSD: wcsdup.3,v 1.2 2011/07/05 19:01:31 nicm Exp $
.\" $NetBSD: wcsdup.3,v 1.3 2010/12/16 17:42:28 wiz Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" from: @(#)strdup.3 8.1 (Berkeley) 6/9/93
.\"
-.Dd $Mdocdate: July 4 2011 $
+.Dd $Mdocdate: July 5 2011 $
.Dt WCSDUP 3
.Os
.Sh NAME
@@ -63,7 +63,7 @@ to an allocated area of memory containing the nul-terminated string
.Bd -literal -offset indent
wchar_t *p;
-if (p = wcsdup(L"foobar"), p == NULL) {
+if ((p = wcsdup(L"foobar")) == NULL) {
fprintf(stderr, "Out of memory.\en");
exit(1);
}