All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Make spice dummy functions inline to fix calls not checking return values
@ 2011-02-01 14:53 Jes.Sorensen
  2011-02-18 16:03 ` [Qemu-devel] " Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Jes.Sorensen @ 2011-02-01 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, kraxel

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

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 <Jes.Sorensen@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] Re: [PATCH] Make spice dummy functions inline to fix calls not checking return values
  2011-02-01 14:53 [Qemu-devel] [PATCH] Make spice dummy functions inline to fix calls not checking return values Jes.Sorensen
@ 2011-02-18 16:03 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-02-18 16:03 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: blauwirbel, qemu-devel

On 02/01/11 15:53, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>
> 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.

picked into spice patch queue.

thanks,
   Gerd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-18 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 14:53 [Qemu-devel] [PATCH] Make spice dummy functions inline to fix calls not checking return values Jes.Sorensen
2011-02-18 16:03 ` [Qemu-devel] " Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.