From 63300b49f30b3d63a551d4d568ae95fea24035ba 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 --- packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet.c') diff --git a/packet.c b/packet.c index 924554d..489bdc3 100644 --- a/packet.c +++ b/packet.c @@ -49,7 +49,7 @@ static int checkmac(void); #define ZLIB_COMPRESS_EXPANSION (((RECV_MAX_PAYLOAD_LEN/16384)+1)*5 + 6) #define ZLIB_DECOMPRESS_INCR 1024 #ifndef DISABLE_ZLIB -static buffer* buf_decompress(buffer* buf, unsigned int len); +static buffer* buf_decompress(const buffer* buf, unsigned int len); static void buf_compress(buffer * dest, buffer * src, unsigned int len); #endif @@ -367,7 +367,7 @@ static int checkmac() { #ifndef DISABLE_ZLIB /* returns a pointer to a newly created buffer */ -static buffer* buf_decompress(buffer* buf, unsigned int len) { +static buffer* buf_decompress(const buffer* buf, unsigned int len) { int result; buffer * ret; -- cgit v1.2.1