]> git.proxmox.com Git - qemu.git/commitdiff
Make spice dummy functions inline to fix calls not checking return values
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 1 Feb 2011 14:53:23 +0000 (15:53 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 3 May 2011 13:35:48 +0000 (15:35 +0200)
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>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/qemu-spice.h

index 916e5dce218132fe062577cf2fc41b8fc91c74e6..3c6f1fe4195538f91551ce7bbcdf72fb131de9b2 100644 (file)
@@ -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; }