diff options
author | des <des@FreeBSD.org> | 2004-01-09 21:16:31 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-01-09 21:16:31 +0000 |
commit | ff23b25ca9fe242253a4d57aa0eef0c0a8d10e81 (patch) | |
tree | 55f28dbe557640fa5339ca5b913f1c607328208b /share | |
parent | cc930dd764165896d0bc10449d4b26e84cf2f7fa (diff) | |
download | FreeBSD-src-ff23b25ca9fe242253a4d57aa0eef0c0a8d10e81.zip FreeBSD-src-ff23b25ca9fe242253a4d57aa0eef0c0a8d10e81.tar.gz |
Move the description of sbuf_delete() closer to the description of
sbuf_new(), and try to make them both a little clearer.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/sbuf.9 | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 84e0d46..e9b695a 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -143,10 +143,19 @@ is not it must point to an array of at least .Fa length characters. -The contents of the provided buffer are undefined; to retrieve the sbuf data -.Fn sbuf_data -must be called on the finished -.Fa sbuf . +The result of accessing that array directly while it is in use by the +sbuf is undefined. +.Pp +The +.Fn sbuf_delete +function clears the +.Fa sbuf +and frees any memory allocated for it. +There must be a call to +.Fn sbuf_delete +for every call to +.Fn sbuf_new . +Any attempt to access the sbuf after it has been deleted will fail. .Pp The .Fn sbuf_clear @@ -284,13 +293,6 @@ only works on a finished .Fa sbuf . .Fn sbuf_done returns non-zero if the sbuf is finished. -.Pp -Finally, the -.Fn sbuf_delete -function clears the -.Fa sbuf -and frees its storage buffer if it was allocated by -.Fn sbuf_new . .Sh NOTES If an operation caused an .Fa sbuf |