Mercurial > dropbear
diff circbuffer.h @ 1459:06d52bcb8094
Pointer parameter could be declared as pointing to const
author | Francois Perrad <francois.perrad@gadz.org> |
---|---|
date | Sat, 19 Aug 2017 17:16:13 +0200 |
parents | acf444bcb115 |
children |
line wrap: on
line diff
--- a/circbuffer.h Sat Aug 12 20:51:58 2017 +0200 +++ b/circbuffer.h Sat Aug 19 17:16:13 2017 +0200 @@ -38,12 +38,12 @@ circbuffer * cbuf_new(unsigned int size); void cbuf_free(circbuffer * cbuf); -unsigned int cbuf_getused(circbuffer * cbuf); /* how much data stored */ -unsigned int cbuf_getavail(circbuffer * cbuf); /* how much we can write */ -unsigned int cbuf_writelen(circbuffer *cbuf); /* max linear write len */ +unsigned int cbuf_getused(const circbuffer * cbuf); /* how much data stored */ +unsigned int cbuf_getavail(const circbuffer * cbuf); /* how much we can write */ +unsigned int cbuf_writelen(const circbuffer *cbuf); /* max linear write len */ /* returns pointers to the two portions of the circular buffer that can be read */ -void cbuf_readptrs(circbuffer *cbuf, +void cbuf_readptrs(const circbuffer *cbuf, unsigned char **p1, unsigned int *len1, unsigned char **p2, unsigned int *len2); unsigned char* cbuf_writeptr(circbuffer *cbuf, unsigned int len);