From 368d25881c94f9e09ef19a3d93e8fec797dbcd05 Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Fri, 4 Feb 2011 09:06:02 +0100 Subject: vnc: fix uint8_t comparisons with negative values Signed-off-by: Corentin Chary Signed-off-by: Anthony Liguori --- ui/vnc-enc-tight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/vnc-enc-tight.c') diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index ad9a9a8a32..81024d5f14 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -1546,7 +1546,7 @@ static int send_sub_rect(VncState *vs, int x, int y, int w, int h) vnc_tight_stop(vs); #ifdef CONFIG_VNC_JPEG - if (vs->tight.quality != -1) { + if (vs->tight.quality != (uint8_t)-1) { double freq = vnc_update_freq(vs, x, y, w, h); if (freq < tight_jpeg_conf[vs->tight.quality].jpeg_freq_min) { @@ -1711,7 +1711,7 @@ static int tight_send_framebuffer_update(VncState *vs, int x, int y, vs->tight.pixel24 = false; } - if (vs->tight.quality != -1) { + if (vs->tight.quality != (uint8_t)-1) { double freq = vnc_update_freq(vs, x, y, w, h); if (freq > tight_jpeg_conf[vs->tight.quality].jpeg_freq_threshold) { -- cgit v1.2.3