From patchwork Wed May 11 13:27:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 95145 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B88101007D7 for ; Wed, 11 May 2011 23:30:13 +1000 (EST) Received: from localhost ([::1]:47240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK9UR-0007yB-Be for incoming@patchwork.ozlabs.org; Wed, 11 May 2011 09:30:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK9Sa-0004h6-9w for qemu-devel@nongnu.org; Wed, 11 May 2011 09:28:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK9SQ-0007bf-92 for qemu-devel@nongnu.org; Wed, 11 May 2011 09:28:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK9SP-0007b1-W8 for qemu-devel@nongnu.org; Wed, 11 May 2011 09:28:06 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4BDS4AK002253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 May 2011 09:28:04 -0400 Received: from rincewind.home.kraxel.org (vpn1-7-108.ams2.redhat.com [10.36.7.108]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4BDS3Do024494; Wed, 11 May 2011 09:28:03 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 080AC4296D; Wed, 11 May 2011 15:28:02 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 11 May 2011 15:27:58 +0200 Message-Id: <1305120482-8207-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1305120482-8207-1-git-send-email-kraxel@redhat.com> References: <1305120482-8207-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Jes Sorensen , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/5] Make spice dummy functions inline to fix calls not checking return values X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen qemu_spice_set_passwd() and qemu_spice_set_pw_expire() dummy functions needs to be inline, in order to handle the case where they are called without checking the return value. Signed-off-by: Jes Sorensen Signed-off-by: Gerd Hoffmann (cherry picked from commit 14da8345b2f7c21bab20fd12b755a61d6277f171) --- ui/qemu-spice.h | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/qemu-spice.h b/ui/qemu-spice.h index 916e5dc..3c6f1fe 100644 --- a/ui/qemu-spice.h +++ b/ui/qemu-spice.h @@ -47,8 +47,16 @@ CharDriverState *qemu_chr_open_spice(QemuOpts *opts); #else /* CONFIG_SPICE */ #define using_spice 0 -#define qemu_spice_set_passwd(_p, _f1, _f2) (-1) -#define qemu_spice_set_pw_expire(_e) (-1) +static inline int qemu_spice_set_passwd(const char *passwd, + bool fail_if_connected, + bool disconnect_if_connected) +{ + return -1; +} +static inline int qemu_spice_set_pw_expire(time_t expires) +{ + return -1; +} static inline int qemu_spice_migrate_info(const char *h, int p, int t, const char *s) { return -1; }