Skip to contentSkip to conversation

Make spice dummy functions inline to fix calls not checking return values

PATCH In review [email protected] 2 participants 2 messages Feb 1, 2011 – Feb 18, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make spice dummy functions inline to fix calls not checking return values

From: Jes Sorensen <[email protected]>

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.

---
 ui/qemu-spice.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
ui/qemu-spice.h +10 -2
index 48239c3..920d501 100644
@@ -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 */
 
Signature · 1 line
1.7.3.5
#1 lore raw
Quoted 5 lines · On 02/01/11 15:53, [email protected] wrote:

From: Jes Sorensen<[email protected]>

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