Mercurial > dropbear
diff packet.c @ 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 | 9169e4e7cbee |
children | fdae6fae00af |
line wrap: on
line diff
--- a/packet.c Sat Aug 12 20:51:58 2017 +0200 +++ b/packet.c Sat Aug 19 17:16:13 2017 +0200 @@ -49,7 +49,7 @@ #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 @@ #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;