[Spice-commits] server/reds.cpp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 8 09:01:11 UTC 2020


 server/reds.cpp |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit f03d094942a03f93aaa81056aa072eea80b59d19
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Mon Jun 8 08:53:19 2020 +0100

    reds: Remove usage of "this"
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>
    Acked-by: Julien Ropé <jrope at redhat.com>

diff --git a/server/reds.cpp b/server/reds.cpp
index fb6e7795..10841b68 100644
--- a/server/reds.cpp
+++ b/server/reds.cpp
@@ -4502,16 +4502,14 @@ RedCharDeviceVDIPort::RedCharDeviceVDIPort(RedsState *reds):
 
 RedCharDeviceVDIPort::~RedCharDeviceVDIPort()
 {
-    RedCharDeviceVDIPort *dev = this;
-
     /* make sure we have no other references to RedVDIReadBuf buffers */
-    dev->reset();
-    if (dev->priv->current_read_buf) {
-        red_pipe_item_unref(&dev->priv->current_read_buf->base);
-        dev->priv->current_read_buf = NULL;
+    reset();
+    if (priv->current_read_buf) {
+        red_pipe_item_unref(&priv->current_read_buf->base);
+        priv->current_read_buf = NULL;
     }
-    g_free(dev->priv->mig_data);
-    spice_extra_assert(dev->priv->num_read_buf == 0);
+    g_free(priv->mig_data);
+    spice_extra_assert(priv->num_read_buf == 0);
 }
 
 RedRecord *reds_get_record(RedsState *reds)


More information about the Spice-commits mailing list