Skip to content

Commit

Permalink
Fix comment in strbuf.h to use correct name strbuf_avail()
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
sprohaska authored and gitster committed Nov 6, 2007
1 parent 9b3beb5 commit a1f611d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions strbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
* that way:
*
* strbuf_grow(sb, SOME_SIZE);
* // ... here the memory areay starting at sb->buf, and of length
* // sb_avail(sb) is all yours, and you are sure that sb_avail(sb) is at
* // least SOME_SIZE
* ... Here, the memory array starting at sb->buf, and of length
* ... strbuf_avail(sb) is all yours, and you are sure that
* ... strbuf_avail(sb) is at least SOME_SIZE.
* strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
*
* Of course, SOME_OTHER_SIZE must be smaller or equal to sb_avail(sb).
* Of course, SOME_OTHER_SIZE must be smaller or equal to strbuf_avail(sb).
*
* Doing so is safe, though if it has to be done in many places, adding the
* missing API to the strbuf module is the way to go.
Expand Down

0 comments on commit a1f611d

Please sign in to comment.