aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc-enc-tight.c
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-02-04 09:06:02 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-02-23 16:28:28 -0600
commit368d25881c94f9e09ef19a3d93e8fec797dbcd05 (patch)
treeb60ef7133fb6ecc962f906a11d6d7a1ae024fc69 /ui/vnc-enc-tight.c
parent148954faca586c42e5a4b06bc3ac67bd44e7fd83 (diff)
vnc: fix uint8_t comparisons with negative values
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/vnc-enc-tight.c')
-rw-r--r--ui/vnc-enc-tight.c4
1 files changed, 2 insertions, 2 deletions
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) {