Skip to content
Snippets Groups Projects
Unverified Commit 83e208ef authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

inflate: make inputs const

Make the inputs const since we never write to the data it points to.

Patch provided by Andrew Jeddeloh
parent 553fedfe
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
#define DEFLATE_ERR_NLEN (-8)
#define DEFLATE_ERR_HUFFMAN (-9)
int16_t inflate(unsigned char *input_buf, uint16_t input_len,
int16_t inflate(unsigned char const *input_buf, uint16_t input_len,
unsigned char *output_buf, uint16_t output_len);
int16_t inflate_zlib(unsigned char *input_buf, uint16_t input_len,
int16_t inflate_zlib(unsigned char const *input_buf, uint16_t input_len,
unsigned char *output_buf, uint16_t output_len);
......@@ -11,8 +11,8 @@
/*
* The compressed (inflated) input data.
*/
unsigned char *deflate_input_now;
unsigned char *deflate_input_end;
unsigned char const *deflate_input_now;
unsigned char const *deflate_input_end;
/*
* The decompressed (deflated) output stream.
......@@ -465,7 +465,7 @@ static int8_t deflate_dynamic_huffman()
#endif
}
int16_t inflate(unsigned char *input_buf, uint16_t input_len,
int16_t inflate(unsigned char const *input_buf, uint16_t input_len,
unsigned char *output_buf, uint16_t output_len)
{
deflate_input_now = input_buf;
......@@ -506,7 +506,7 @@ int16_t inflate(unsigned char *input_buf, uint16_t input_len,
}
}
int16_t inflate_zlib(unsigned char *input_buf, uint16_t input_len,
int16_t inflate_zlib(unsigned char const *input_buf, uint16_t input_len,
unsigned char *output_buf, uint16_t output_len)
{
if (input_len < 4) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment