[Spice-devel] [PATCH] spice_server_char_device_add_interface: remove local 'reds' variable

Jonathon Jongsma jjongsma at redhat.com
Tue Apr 19 20:08:47 UTC 2016


The local 'reds' variable shadows the 'reds' function argument and it is
the exact same instance.
---
 server/reds.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 60d8903..327711d 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3238,11 +3238,8 @@ static int spice_server_char_device_add_interface(SpiceServer *reds,
     }
 
     if (dev_state) {
-        RedsState *reds;
-
         spice_assert(char_device->st);
 
-        g_object_get(G_OBJECT(dev_state), "spice-server", &reds, NULL);
         g_object_weak_ref(G_OBJECT(dev_state),
                           (GWeakNotify)reds_on_char_device_state_destroy,
                           reds);
-- 
2.4.11



More information about the Spice-devel mailing list