diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2019-05-10 17:04:47 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2020-02-07 15:26:34 +0000 |
commit | ac4763bd89c8106814020d87d2a08b17549557ef (patch) | |
tree | e1585808d28b8216b65061bf6bc4bd6f9903295d | |
parent | 48944f6f41cd85efb400a7571a0ad22a6dd09027 (diff) |
lz_decompress: Constify some variable
Make clear they are not supposed to be changed.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
-rw-r--r-- | common/lz_decompress_tmpl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c index 462513f..9ac139f 100644 --- a/common/lz_decompress_tmpl.c +++ b/common/lz_decompress_tmpl.c @@ -222,7 +222,7 @@ static size_t FNAME(decompress)(Encoder *encoder, OUT_PIXEL *out_buf, int size) { OUT_PIXEL *op = out_buf; - OUT_PIXEL *op_limit = out_buf + size; + OUT_PIXEL *const op_limit = out_buf + size; uint32_t ctrl = decode(encoder); for (;;) { @@ -280,7 +280,7 @@ static size_t FNAME(decompress)(Encoder *encoder, OUT_PIXEL *out_buf, int size) // because the number of pixel copied is larger // then one... /* optimize copy for a run */ - OUT_PIXEL b = *ref; + const OUT_PIXEL b = *ref; for (; len; --len) { COPY_PIXEL(b, op); spice_assert(op <= op_limit); |