From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58659 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkHh4-0002M8-E3 for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:59:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkHbl-0004Fw-7N for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:53:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkHbk-0004Fl-Tp for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:53:29 -0500 From: Jes.Sorensen@redhat.com Date: Tue, 1 Feb 2011 15:53:23 +0100 Message-Id: <1296572003-13732-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH] Make spice dummy functions inline to fix calls not checking return values 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, kraxel@redhat.com 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 --- 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 48239c3..920d501 100644 --- a/ui/qemu-spice.h +++ b/ui/qemu-spice.h @@ -42,8 +42,16 @@ void do_info_spice(Monitor *mon, QObject **ret_data); #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; +} #endif /* CONFIG_SPICE */ -- 1.7.3.5