svn commit: r230054 - stable/9/share/man/man9

Jaakko Heinonen jh at
Fri Jan 13 10:54:26 UTC 2012

Author: jh
Date: Fri Jan 13 10:54:26 2012
New Revision: 230054

  MFC r228358:
  - Fix markup.
  - Remove trailing whitespace.
  MFC r228359:
  sbuf_data() hasn't returned NULL for overflowed buffers since r71721.
  MFC r228784:
  Follow style(9) more closely in the example.

Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/sbuf.9
--- stable/9/share/man/man9/sbuf.9	Fri Jan 13 10:21:17 2012	(r230053)
+++ stable/9/share/man/man9/sbuf.9	Fri Jan 13 10:54:26 2012	(r230054)
@@ -25,7 +25,7 @@
 .\" $FreeBSD$
-.Dd January 25, 2011
+.Dd December 21, 2011
 .Dt SBUF 9
@@ -117,7 +117,7 @@ defined in
 Any errors encountered during the allocation or composition of the
 string will be latched in the data structure,
-making a single error test at the end of the composition 
+making a single error test at the end of the composition
 sufficient to determine success or failure of the entire process.
@@ -391,7 +391,8 @@ function returns the actual string;
 only works on a finished
 .Fa sbuf .
-.Fn sbuf_len function returns the length of the string.
+.Fn sbuf_len
+function returns the length of the string.
 For an
 .Fa sbuf
 with an attached drain,
@@ -462,12 +463,8 @@ function returns a non-zero value if the
 drain error, and zero otherwise.
-.Fn sbuf_data
 .Fn sbuf_len
-functions return
-and \-1, respectively, if the buffer overflowed.
+function returns \-1 if the buffer overflowed.
 .Fn sbuf_copyin
@@ -482,7 +479,7 @@ being finished,
 or returns the error code from the drain if one is attached.
-.Fn sbuf_finish 3 
+.Fn sbuf_finish 3
 function (the userland version)
 will return zero for success and \-1 and set errno on error.
@@ -498,8 +495,8 @@ TAILQ_FOREACH(foo, &foolist, list) {
 	sbuf_printf(sb, "      Address: %s\en", foo->address);
 	sbuf_printf(sb, "      Zip: %s\en", foo->zipcode);
-if (sbuf_finish(sb)) /* Check for any and all errors */
-	err(1,"Could not generate message");
+if (sbuf_finish(sb) != 0) /* Check for any and all errors */
+	err(1, "Could not generate message");
 transmit_msg(sbuf_data(sb), sbuf_len(sb));

More information about the svn-src-all mailing list