mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-26 14:18:36 +00:00
lz: Don't try to print uninitialized variable
encoder->type is only going to be set by lz_set_sizes() after the error() call. We can use 'type' directly which is what encoder->type is going to be set to. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
187df0cfdb
commit
2f64e2edbb
@ -616,7 +616,7 @@ void lz_decode_begin(LzContext *lz, uint8_t *io_ptr, unsigned int num_io_bytes,
|
||||
|
||||
int type = decode_32(encoder);
|
||||
if (type <= LZ_IMAGE_TYPE_INVALID || type > LZ_IMAGE_TYPE_A8) {
|
||||
encoder->usr->error(encoder->usr, "invalid lz type %d\n", encoder->type);
|
||||
encoder->usr->error(encoder->usr, "invalid lz type %d\n", type);
|
||||
}
|
||||
int width = decode_32(encoder);
|
||||
int height = decode_32(encoder);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user