[Spice-devel] [PATCH spice-server v2 5/7] fixup! Convert RedChannelClient hierarchy to GObject

Frediano Ziglio fziglio at redhat.com
Fri Sep 30 13:21:50 UTC 2016


Style changes.
New code should respect style.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/smartcard-channel-client.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/server/smartcard-channel-client.c b/server/smartcard-channel-client.c
index 76b8eed..afd0899 100644
--- a/server/smartcard-channel-client.c
+++ b/server/smartcard-channel-client.c
@@ -395,12 +395,14 @@ int smartcard_channel_client_handle_migrate_flush_mark(RedChannelClient *rcc)
 void smartcard_channel_client_set_char_device(SmartCardChannelClient *scc,
                                               RedCharDeviceSmartcard *device)
 {
-    if (device == scc->priv->smartcard)
+    if (device == scc->priv->smartcard) {
         return;
+    }
 
-    if (scc->priv->smartcard)
+    if (scc->priv->smartcard) {
         g_object_remove_weak_pointer(G_OBJECT(scc->priv->smartcard),
                                      (gpointer*)&scc->priv->smartcard);
+    }
 
     scc->priv->smartcard = device;
     g_object_add_weak_pointer(G_OBJECT(scc->priv->smartcard),
-- 
2.7.4



More information about the Spice-devel mailing list