diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-03-09 02:49:57 +0100 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-03-09 02:49:57 +0100 |
commit | 0edb356c587abc2dd31f3a2fa99899a7432db495 (patch) | |
tree | c7569c80931949737e3386de89879ca65a2b33c6 | |
parent | d9b4881f64d63fb9298e302ee32668d77a38b76b (diff) | |
download | man-pages-0edb356c587abc2dd31f3a2fa99899a7432db495.tar.gz |
fmemopen.3: Small improvements to the description of open_memstream()
Make it a little more evident that the caller should not
pass a previously allocated buffer to open_memstream().
Reported-by: Rasmus Villemoes <Rasmus.Villemoes@decode.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r-- | man3/fmemopen.3 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index c14587098d..bf6d78d42b 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -135,14 +135,18 @@ below). The .BR open_memstream () function opens a stream for writing to a buffer. -The buffer -is dynamically allocated (as with +The function dynamically allocates the buffer (in the manner of .BR malloc (3)), -and automatically grows as required. +and the buffer automatically grows as required. After closing the stream, the caller should .BR free (3) this buffer. +The locations pointed to by +.IR ptr +and +.I sizeloc +are used to report the current location and size of the buffer. When the stream is closed .RB ( fclose (3)) or flushed |