[Spice-commits] src/channel-usbredir.c src/spice-channel.c

Victor Toso de Carvalho victortoso at kemper.freedesktop.org
Fri Mar 2 10:38:12 UTC 2018


 src/channel-usbredir.c |    8 +++++---
 src/spice-channel.c    |    7 +++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 70f7ea942adc98d836601a1735bf1b3cf82520e8
Author: Victor Toso <me at victortoso.com>
Date:   Thu Mar 1 10:14:58 2018 +0100

    Don't exceed one statement per line
    
    Cosmetic change. One break was dropped on _default:_ label of switch
    
    Signed-off-by: Victor Toso <victortoso at redhat.com>
    Acked-by: Marc-André Lureau <marcandre.lureau at redhat.com>

diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index a19df17..f509e49 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -622,11 +622,13 @@ static void usbredir_log(void *user_data, int level, const char *msg)
 
     switch (level) {
         case usbredirparser_error:
-            g_critical("%s", msg); break;
+            g_critical("%s", msg);
+            break;
         case usbredirparser_warning:
-            g_warning("%s", msg); break;
+            g_warning("%s", msg);
+            break;
         default:
-            CHANNEL_DEBUG(channel, "%s", msg); break;
+            CHANNEL_DEBUG(channel, "%s", msg);
     }
 }
 
diff --git a/src/spice-channel.c b/src/spice-channel.c
index 1d66d05..c725903 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -1355,8 +1355,11 @@ static void spice_channel_send_link(SpiceChannel *channel)
 
     c->link_hdr.size = GUINT32_TO_LE(c->link_hdr.size);
 
-    memcpy(p, &c->link_hdr, sizeof(c->link_hdr)); p += sizeof(c->link_hdr);
-    memcpy(p, &link_msg, sizeof(link_msg)); p += sizeof(link_msg);
+    memcpy(p, &c->link_hdr, sizeof(c->link_hdr));
+    p += sizeof(c->link_hdr);
+
+    memcpy(p, &link_msg, sizeof(link_msg));
+    p += sizeof(link_msg);
 
     caps = SPICE_UNALIGNED_CAST(uint32_t *,p);
     for (i = 0; i < c->common_caps->len; i++) {


More information about the Spice-commits mailing list