[PATCH 02/15] spice_server_add_interface: use local 'reds' variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

Prefer local argument variable over global 'reds' variable
---
 server/reds.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 84541e4..5bcdc09 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3194,13 +3194,11 @@ static void spice_server_char_device_remove_interface(RedsState *reds, SpiceBase
     char_device->st = NULL;
 }
 
-SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *s,
+SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds,
                                                   SpiceBaseInstance *sin)
 {
     const SpiceBaseInterface *interface = sin->sif;
 
-    spice_assert(reds == s);
-
     if (strcmp(interface->type, SPICE_INTERFACE_KEYBOARD) == 0) {
         spice_info("SPICE_INTERFACE_KEYBOARD");
         if (interface->major_version != SPICE_INTERFACE_KEYBOARD_MAJOR ||
@@ -3275,7 +3273,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *s,
             spice_warning("unsupported char device interface");
             return -1;
         }
-        spice_server_char_device_add_interface(s, sin);
+        spice_server_char_device_add_interface(reds, sin);
 
     } else if (strcmp(interface->type, SPICE_INTERFACE_MIGRATION) == 0) {
         spice_info("SPICE_INTERFACE_MIGRATION");
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]