ref: 33eab15944a6359ed4c1a10c72e425fc76eeeee8
parent: 8638d78c76ab7689666ccacb615d1ac399961f2d
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Tue Nov 19 10:01:40 EST 2013
Document some string buffer function usage.
--- a/src/http.c
+++ b/src/http.c
@@ -616,6 +616,8 @@
_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 @@
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;