From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47624 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqLIy-0007iO-2D for qemu-devel@nongnu.org; Tue, 31 Aug 2010 03:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqLIw-0003mw-J7 for qemu-devel@nongnu.org; Tue, 31 Aug 2010 03:30:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42680) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqLIw-0003mj-B6 for qemu-devel@nongnu.org; Tue, 31 Aug 2010 03:30:50 -0400 From: Jes.Sorensen@redhat.com Date: Tue, 31 Aug 2010 09:30:36 +0200 Message-Id: <1283239838-20349-5-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1283239838-20349-1-git-send-email-Jes.Sorensen@redhat.com> References: <1283239838-20349-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH 4/6] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, Jes.Sorensen@redhat.com From: Jes Sorensen Signed-off-by: Jes Sorensen --- ui/vnc-enc-tight.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index c4c9c3b..c942bb7 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -905,7 +905,7 @@ static void tight_pack24(VncState *vs, uint8_t *buf, size_t count, size_t *ret) static int send_full_color_rect(VncState *vs, int x, int y, int w, int h) { int stream = 0; - size_t bytes; + ssize_t bytes; #ifdef CONFIG_VNC_PNG if (tight_can_send_png_rect(vs, w, h)) { @@ -949,7 +949,7 @@ static int send_solid_rect(VncState *vs) static int send_mono_rect(VncState *vs, int x, int y, int w, int h, uint32_t bg, uint32_t fg) { - size_t bytes; + ssize_t bytes; int stream = 1; int level = tight_conf[vs->tight.compression].mono_zlib_level; @@ -1029,7 +1029,7 @@ static bool send_gradient_rect(VncState *vs, int x, int y, int w, int h) { int stream = 3; int level = tight_conf[vs->tight.compression].gradient_zlib_level; - size_t bytes; + ssize_t bytes; if (vs->clientds.pf.bytes_per_pixel == 1) return send_full_color_rect(vs, x, y, w, h); @@ -1066,7 +1066,7 @@ static int send_palette_rect(VncState *vs, int x, int y, int stream = 2; int level = tight_conf[vs->tight.compression].idx_zlib_level; int colors; - size_t bytes; + ssize_t bytes; #ifdef CONFIG_VNC_PNG if (tight_can_send_png_rect(vs, w, h)) { -- 1.7.2.2