summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorben <ben@FreeBSD.org>2001-01-01 05:19:52 +0000
committerben <ben@FreeBSD.org>2001-01-01 05:19:52 +0000
commit97e5bd7d4ef889f99bc19ab453f785bb2b74e62b (patch)
treea33526609ff1b0361323a22f504d0a95518eb9be /lib
parentc368baf0b4b71746d7a6d84e1e709b7ccb5e1209 (diff)
downloadFreeBSD-src-97e5bd7d4ef889f99bc19ab453f785bb2b74e62b.zip
FreeBSD-src-97e5bd7d4ef889f99bc19ab453f785bb2b74e62b.tar.gz
Make it a bit clearer that asprintf doesn't actually "return" a pointer in
the normal sense of the word, but does it through one of its arguments which is a pointer to a pointer. PR: 23717 Submitted by: phk
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdio/printf.37
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 5ea5163..308a1b4 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -123,10 +123,9 @@ used to end output to strings).
.Fn Asprintf
and
.Fn vasprintf
-return a pointer to a buffer sufficiently large to hold the
-string in the
-.Fa ret
-argument;
+set
+.Fa *ret
+to be a pointer to a buffer sufficiently large to hold the formatted string.
This pointer should be passed to
.Xr free 3
to release the allocated storage when it is no longer needed.
OpenPOWER on IntegriCloud