[Spice-devel] [PATCH 02/15] spice_server_add_interface: use local 'reds' variable
Frediano Ziglio
fziglio at redhat.com
Thu Jan 21 08:16:17 PST 2016
From: Jonathon Jongsma <jjongsma at redhat.com>
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
More information about the Spice-devel
mailing list