summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-07-05 19:01:31 +0000
committernicm <nicm@openbsd.org>2011-07-05 19:01:31 +0000
commit9f544722de08de035da55f1bd1435b984da63974 (patch)
tree7a9624174b4311a039813482985fa77206df280a /lib/libc
parentAdd linux_to_native_timespec() for future futex use. Okay tedu@. (diff)
downloadwireguard-openbsd-9f544722de08de035da55f1bd1435b984da63974.tar.xz
wireguard-openbsd-9f544722de08de035da55f1bd1435b984da63974.zip
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);
}