[Spice-devel,12/13] char device: use 'device' rather than 'state' for var names

Submitted by Jonathon Jongsma on April 13, 2016, 7:38 p.m.

Details

Message ID 1460576282-27544-13-git-send-email-jjongsma@redhat.com
State Accepted
Commit 82024257b6a79744455a7c9678ce69cab5c40ccf
Headers show
Series "Backported patches from refactory branch (April 13)" ( rev: 4 3 2 1 ) in Spice

Commit Message

Jonathon Jongsma April 13, 2016, 7:38 p.m.
Since the type name was changed, use variable names / debug statements
that are consistent with the new name.
---
 server/char-device.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/char-device.c b/server/char-device.c
index e932b4e..c7e6eca 100644
--- a/server/char-device.c
+++ b/server/char-device.c
@@ -700,13 +700,13 @@  void red_char_device_write_buffer_release(RedCharDevice *dev,
  * char_device_state management *
  ********************************/
 
-void red_char_device_reset_dev_instance(RedCharDevice *state,
+void red_char_device_reset_dev_instance(RedCharDevice *dev,
                                         SpiceCharDeviceInstance *sin)
 {
-    spice_debug("sin %p dev_state %p", sin, state);
-    state->priv->sin = sin;
-    sin->st = state;
-    g_object_notify(G_OBJECT(state), "sin");
+    spice_debug("sin %p, char device %p", sin, dev);
+    dev->priv->sin = sin;
+    sin->st = dev;
+    g_object_notify(G_OBJECT(dev), "sin");
 }
 
 void *red_char_device_opaque_get(RedCharDevice *dev)
@@ -771,7 +771,7 @@  int red_char_device_client_add(RedCharDevice *dev,
 
     dev->priv->wait_for_migrate_data = wait_for_migrate_data;
 
-    spice_debug("dev_state %p client %p", dev, client);
+    spice_debug("char device %p, client %p", dev, client);
     dev_client = red_char_device_client_new(client, do_flow_control,
                                             max_send_queue_size,
                                             num_client_tokens,
@@ -789,7 +789,7 @@  void red_char_device_client_remove(RedCharDevice *dev,
 {
     RedCharDeviceClient *dev_client;
 
-    spice_debug("dev_state %p client %p", dev, client);
+    spice_debug("char device %p, client %p", dev, client);
     dev_client = red_char_device_client_find(dev, client);
 
     if (!dev_client) {
@@ -818,7 +818,7 @@  int red_char_device_client_exists(RedCharDevice *dev,
 
 void red_char_device_start(RedCharDevice *dev)
 {
-    spice_debug("dev_state %p", dev);
+    spice_debug("char device %p", dev);
     dev->priv->running = TRUE;
     g_object_ref(dev);
     while (red_char_device_write_to_device(dev) ||
@@ -828,7 +828,7 @@  void red_char_device_start(RedCharDevice *dev)
 
 void red_char_device_stop(RedCharDevice *dev)
 {
-    spice_debug("dev_state %p", dev);
+    spice_debug("char device %p", dev);
     dev->priv->running = FALSE;
     dev->priv->active = FALSE;
     if (dev->priv->write_to_dev_timer) {
@@ -842,7 +842,7 @@  void red_char_device_reset(RedCharDevice *dev)
 
     red_char_device_stop(dev);
     dev->priv->wait_for_migrate_data = FALSE;
-    spice_debug("dev_state %p", dev);
+    spice_debug("char device %p", dev);
     while (!ring_is_empty(&dev->priv->write_queue)) {
         RingItem *item = ring_get_tail(&dev->priv->write_queue);
         RedCharDeviceWriteBuffer *buf;