[PATCH] usbredir_handle_msg: rename data to err_data

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

 



To better reflect what this variable is used for and change the declare
location such that it will be declared only if it should
---
 src/channel-usbredir.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index d04267f..0f76126 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -629,7 +629,6 @@ static void usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in)
 {
     SpiceUsbredirChannel *channel = SPICE_USBREDIR_CHANNEL(c);
     SpiceUsbredirChannelPrivate *priv = channel->priv;
-    device_error_data data;
     int r, size;
     uint8_t *buf;
 
@@ -645,6 +644,7 @@ static void usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in)
     r = usbredirhost_read_guest_data(priv->host);
     if (r != 0) {
         SpiceUsbDevice *spice_device = priv->spice_device;
+        device_error_data err_data;
         gchar *desc;
         GError *err;
 
@@ -674,14 +674,14 @@ static void usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in)
 
         CHANNEL_DEBUG(c, "%s", err->message);
 
-        data.channel = channel;
-        data.caller = coroutine_self();
-        data.spice_device = g_boxed_copy(spice_usb_device_get_type(), spice_device);
-        data.error = err;
-        g_idle_add(device_error, &data);
+        err_data.channel = channel;
+        err_data.caller = coroutine_self();
+        err_data.spice_device = g_boxed_copy(spice_usb_device_get_type(), spice_device);
+        err_data.error = err;
+        g_idle_add(device_error, &err_data);
         coroutine_yield(NULL);
 
-        g_boxed_free(spice_usb_device_get_type(), data.spice_device);
+        g_boxed_free(spice_usb_device_get_type(), err_data.spice_device);
 
         g_error_free(err);
     }
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]