summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-03-12 10:45:19 +0100
committerDerf Null <derf@finalrewind.org>2023-03-12 10:45:19 +0100
commit83e208ef1744cdf7aa1cd290c1caae2c903d2ec4 (patch)
tree16855cd95ae8d7374dd541fb52bba84840c5eb93 /src
parent553fedfeb11f95e1773b5f6cdfc7775834cbfa12 (diff)
inflate: make inputs const
Make the inputs const since we never write to the data it points to. Patch provided by Andrew Jeddeloh
Diffstat (limited to 'src')
-rw-r--r--src/lib/inflate.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/inflate.cc b/src/lib/inflate.cc
index 02fe350..cd29af0 100644
--- a/src/lib/inflate.cc
+++ b/src/lib/inflate.cc
@@ -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) {