From 89e64c631ec8dee41ec4de888548d36887b6ec98 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sat, 19 Aug 2017 17:16:13 +0200 Subject: Pointer parameter could be declared as pointing to const --- buffer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'buffer.h') diff --git a/buffer.h b/buffer.h index c32b84b..befe1c7 100644 --- a/buffer.h +++ b/buffer.h @@ -44,8 +44,8 @@ buffer * buf_new(unsigned int size); /* Possibly returns a new buffer*, like realloc() */ buffer * buf_resize(buffer *buf, unsigned int newsize); void buf_free(buffer* buf); -void buf_burn(buffer* buf); -buffer* buf_newcopy(buffer* buf); +void buf_burn(const buffer* buf); +buffer* buf_newcopy(const buffer* buf); void buf_setlen(buffer* buf, unsigned int len); void buf_incrlen(buffer* buf, unsigned int incr); void buf_setpos(buffer* buf, unsigned int pos); @@ -54,8 +54,8 @@ void buf_incrwritepos(buffer* buf, unsigned int incr); unsigned char buf_getbyte(buffer* buf); unsigned char buf_getbool(buffer* buf); void buf_putbyte(buffer* buf, unsigned char val); -unsigned char* buf_getptr(buffer* buf, unsigned int len); -unsigned char* buf_getwriteptr(buffer* buf, unsigned int len); +unsigned char* buf_getptr(const buffer* buf, unsigned int len); +unsigned char* buf_getwriteptr(const buffer* buf, unsigned int len); char* buf_getstring(buffer* buf, unsigned int *retlen); buffer * buf_getstringbuf(buffer *buf); void buf_eatstring(buffer *buf); -- cgit v1.2.3