qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com
Subject: [Qemu-devel] [PATCH 12/14] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data()
Date: Mon, 30 Aug 2010 17:59:18 +0200	[thread overview]
Message-ID: <1283183960-28404-13-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com>

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 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

  parent reply	other threads:[~2010-08-30 15:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 15:59 [Qemu-devel] [PATCH 00/14] gcc extra warning fixes v2 Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 01/14] Remove unused argument for nbd_client() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 02/14] Respect return value from nbd_client() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 03/14] Fix repeated typo: was "end if list" instead of "end of list" Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 04/14] Zero initialize timespec struct explicitly Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 05/14] Remove unused argument for check_for_block_signature() Jes.Sorensen
2010-08-30 16:16   ` [Qemu-devel] " Anthony Liguori
2010-08-30 16:40     ` Paolo Bonzini
2010-08-30 18:19       ` Jes Sorensen
2010-08-30 18:27         ` Anthony Liguori
2010-08-30 19:24           ` Richard Henderson
2010-08-31  7:13           ` Jes Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 07/14] Remove unused argument for get_whole_cluster() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 11/14] Remove unused function arguments Jes.Sorensen
2010-08-30 15:59 ` Jes.Sorensen [this message]
2010-08-30 15:59 ` [Qemu-devel] [PATCH 13/14] Change DPRINTF() to do{}while(0) to avoid compiler warning Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 14/14] load_multiboot(): get_image_size() returns int Jes.Sorensen
2010-08-31  7:48 ` [Qemu-devel] Re: [PATCH 00/14] gcc extra warning fixes v2 Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283183960-28404-13-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).