From patchwork Mon Aug 30 15:35:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 63069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5B101B7107 for ; Tue, 31 Aug 2010 02:13:28 +1000 (EST) Received: from localhost ([127.0.0.1]:45404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq6yk-0000Yq-FL for incoming@patchwork.ozlabs.org; Mon, 30 Aug 2010 12:13:02 -0400 Received: from [140.186.70.92] (port=44159 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq6QB-0008Ts-EU for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:37:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq6QA-0003h8-B9 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:37:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35037) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq6Q9-0003h4-V4 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:37:18 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7UFaEmH006672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Aug 2010 11:36:14 -0400 Received: from localhost6.localdomain6 ([10.3.121.6]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7UFZnEB010962; Mon, 30 Aug 2010 11:36:13 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Mon, 30 Aug 2010 17:35:45 +0200 Message-Id: <1283182547-26116-13-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1283182547-26116-1-git-send-email-Jes.Sorensen@redhat.com> References: <1283182547-26116-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com Subject: [Qemu-devel] [PATCH 12/14] size_t is unsigned, so (foo >= 0) is always true X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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..df975af 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -926,7 +926,7 @@ static int send_full_color_rect(VncState *vs, int x, int y, int w, int h) tight_conf[vs->tight.compression].raw_zlib_level, Z_DEFAULT_STRATEGY); - return (bytes >= 0); + return 1; } static int send_solid_rect(VncState *vs) @@ -1001,7 +1001,7 @@ static int send_mono_rect(VncState *vs, int x, int y, vs->tight.tight.offset = bytes; bytes = tight_compress_data(vs, stream, bytes, level, Z_DEFAULT_STRATEGY); - return (bytes >= 0); + return 1; } struct palette_cb_priv { @@ -1057,7 +1057,7 @@ static bool send_gradient_rect(VncState *vs, int x, int y, int w, int h) bytes = tight_compress_data(vs, stream, bytes, level, Z_FILTERED); - return (bytes >= 0); + return 1; } static int send_palette_rect(VncState *vs, int x, int y, @@ -1118,7 +1118,7 @@ static int send_palette_rect(VncState *vs, int x, int y, bytes = tight_compress_data(vs, stream, bytes, level, Z_DEFAULT_STRATEGY); - return (bytes >= 0); + return 1; } #if defined(CONFIG_VNC_JPEG) || defined(CONFIG_VNC_PNG)