summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-04-16 23:17:10 +0000
committermillert <millert@openbsd.org>2003-04-16 23:17:10 +0000
commitae5abbc7cda367c57e2ba3ac19c7250ee03f2c21 (patch)
treea933f74e3858e72ce83da976f1b75f7e851668f1 /lib/libc
parentstring cleaning. ok tedu@ (diff)
downloadwireguard-openbsd-ae5abbc7cda367c57e2ba3ac19c7250ee03f2c21.tar.xz
wireguard-openbsd-ae5abbc7cda367c57e2ba3ac19c7250ee03f2c21.zip
Warn people that the value of the pointer passed in to asprinf()
is implementation-specific when we get ENOMEM but mention that *we* set it to NULL.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/printf.311
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 27a49825bf5..0d17e6aec57 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.38 2002/07/24 22:58:39 millert Exp $
+.\" $OpenBSD: printf.3,v 1.39 2003/04/16 23:17:10 millert Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -146,9 +146,14 @@ This pointer should be passed to
.Xr free 3
to release the allocated storage when it is no longer needed.
If sufficient space cannot be allocated, these functions
-will return \-1 and set
+will return \-1.
+The value of
.Fa ret
-to be a null pointer.
+in this situation is implementation-dependent
+(on
+.Ox ,
+.Fa ret
+will be set to the null pointer, but this behavior should not be relied upon).
.Pp
.Fn snprintf
and