diff options
author | phk <phk@FreeBSD.org> | 2011-05-19 13:42:19 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2011-05-19 13:42:19 +0000 |
commit | ef4a1126716f234ca21a4cbaa5ef105807cfedc9 (patch) | |
tree | cc9ade36ad7f9eccfd55a690706de4a4edd007fd /share | |
parent | 472dc8e04030b104df96c0257b4dc44f23e2293c (diff) | |
download | FreeBSD-src-ef4a1126716f234ca21a4cbaa5ef105807cfedc9.zip FreeBSD-src-ef4a1126716f234ca21a4cbaa5ef105807cfedc9.tar.gz |
When adding examples to man-pages, try to make them at least
look like they might work.
Prodded by: Vadim Goncharov
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/sbuf.9 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 500bfbd..0e6da36 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -492,13 +492,13 @@ will return zero for success and \-1 and set errno on error. struct sbuf *sb; sb = sbuf_new_auto(); -sbuf_cat("Customers found:\en"); +sbuf_cat(sb, "Customers found:\en"); TAILQ_FOREACH(foo, &foolist, list) { - sbuf_printf(" %4d %s\en", foo->index, foo->name); - sbuf_printf(" Address: %s\en", foo->address); - sbuf_printf(" Zip: %s\en", foo->zipcode); + sbuf_printf(sb, " %4d %s\en", foo->index, foo->name); + sbuf_printf(sb, " Address: %s\en", foo->address); + sbuf_printf(sb, " Zip: %s\en", foo->zipcode); } -if (sbuf_finish(sb)) +if (sbuf_finish(sb)) /* Check for any and all errors */ err(1,"Could not generate message"); transmit_msg(sbuf_data(sb), sbuf_len(sb)); sbuf_delete(sb); |