summaryrefslogtreecommitdiffhomepage
path: root/circbuffer.h
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2017-08-19 17:16:13 +0200
committerFrancois Perrad <francois.perrad@gadz.org>2017-08-19 17:16:13 +0200
commit89e64c631ec8dee41ec4de888548d36887b6ec98 (patch)
tree91fc3aee54e9b9cac7ec893ddf91cb944e3fc220 /circbuffer.h
parent468656b4aab5bc0040e3ecbfd7f66f52a15da76d (diff)
Pointer parameter could be declared as pointing to const
Diffstat (limited to 'circbuffer.h')
-rw-r--r--circbuffer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/circbuffer.h b/circbuffer.h
index 744a2c1..5aaa762 100644
--- a/circbuffer.h
+++ b/circbuffer.h
@@ -38,12 +38,12 @@ typedef struct circbuf circbuffer;
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);