From 83e208ef1744cdf7aa1cd290c1caae2c903d2ec4 Mon Sep 17 00:00:00 2001 From: Derf Null Date: Sun, 12 Mar 2023 10:45:19 +0100 Subject: inflate: make inputs const Make the inputs const since we never write to the data it points to. Patch provided by Andrew Jeddeloh --- src/lib/inflate.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3