From 33eab15944a6359ed4c1a10c72e425fc76eeeee8 Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" <tterribe@xiph.org> Date: Tue, 19 Nov 2013 15:01:40 -0800 Subject: [PATCH] Document some string buffer function usage. --- src/http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/http.c b/src/http.c index a9ef680..3a10d2b 100644 --- a/src/http.c +++ b/src/http.c @@ -616,6 +616,8 @@ static void op_sb_clear(OpusStringBuf *_sb){ _ogg_free(_sb->buf); } +/*Make sure we have room for at least _capacity characters (plus 1 more for the + terminating NUL).*/ static int op_sb_ensure_capacity(OpusStringBuf *_sb,int _capacity){ char *buf; int cbuf; @@ -633,6 +635,8 @@ static int op_sb_ensure_capacity(OpusStringBuf *_sb,int _capacity){ return 0; } +/*Increase the capacity of the buffer, but not to more than _max_size + characters (plus 1 more for the terminating NUL).*/ static int op_sb_grow(OpusStringBuf *_sb,int _max_size){ char *buf; int cbuf; -- GitLab