From 7e7a6ec0336a376f59ad113b6dcb97c444b79fa4 Mon Sep 17 00:00:00 2001 From: Ben Smithurst Date: Mon, 1 Jan 2001 05:19:52 +0000 Subject: [PATCH] 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 --- lib/libc/stdio/printf.3 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 5ea5163e31d3..308a1b49cafb 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.