aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/sbuf.9
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2004-01-09 21:16:31 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2004-01-09 21:16:31 +0000
commit91c9d24e52990321cc7f9b116388386f065b34e5 (patch)
tree55f28dbe557640fa5339ca5b913f1c607328208b /share/man/man9/sbuf.9
parent2ccd1cac9576cbeebfc30436d11ece5ef3523ec2 (diff)
downloadsrc-91c9d24e52990321cc7f9b116388386f065b34e5.tar.gz
src-91c9d24e52990321cc7f9b116388386f065b34e5.zip
Move the description of sbuf_delete() closer to the description of
sbuf_new(), and try to make them both a little clearer.
Notes
Notes: svn path=/head/; revision=124316
Diffstat (limited to 'share/man/man9/sbuf.9')
-rw-r--r--share/man/man9/sbuf.924
1 files changed, 13 insertions, 11 deletions
diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9
index 84e0d46be732..e9b695a36f1f 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