[Spice-commits] 2 commits - server/main-channel-client.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 2 07:48:36 UTC 2020


 server/main-channel-client.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 0fcb6fa4d27c15ec9b2b661db0824e4decabcac7
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Nov 14 09:01:54 2019 +0000

    main-channel-client: Remove useless check
    
    main_channel_client_push_ping is never called with mcc NULL.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Snir Sheriber <ssheribe at redhat.com>

diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index a538b6d0..2954036d 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -282,12 +282,7 @@ static RedPipeItem *red_ping_item_new(int size)
 
 static void main_channel_client_push_ping(MainChannelClient *mcc, int size)
 {
-    RedPipeItem *item;
-
-    if (mcc == NULL) {
-        return;
-    }
-    item = red_ping_item_new(size);
+    RedPipeItem *item = red_ping_item_new(size);
     red_channel_client_pipe_add_push(RED_CHANNEL_CLIENT(mcc), item);
 }
 
commit 99bdb4bdddfbf97eab5aff3e15e53fefb7883620
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Nov 14 09:00:23 2019 +0000

    main-channel-client: Remove unused result from main_channel_client_push_ping
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Snir Sheriber <ssheribe at redhat.com>

diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index ef6e065f..a538b6d0 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -232,7 +232,7 @@ static void main_channel_client_init(MainChannelClient *self)
     self->priv->bitrate_per_sec = ~0;
 }
 
-static bool main_channel_client_push_ping(MainChannelClient *mcc, int size);
+static void main_channel_client_push_ping(MainChannelClient *mcc, int size);
 
 static void main_notify_item_free(RedPipeItem *base)
 {
@@ -280,16 +280,15 @@ static RedPipeItem *red_ping_item_new(int size)
     return &item->base;
 }
 
-static bool main_channel_client_push_ping(MainChannelClient *mcc, int size)
+static void main_channel_client_push_ping(MainChannelClient *mcc, int size)
 {
     RedPipeItem *item;
 
     if (mcc == NULL) {
-        return FALSE;
+        return;
     }
     item = red_ping_item_new(size);
     red_channel_client_pipe_add_push(RED_CHANNEL_CLIENT(mcc), item);
-    return TRUE;
 }
 
 static RedPipeItem *main_agent_tokens_item_new(uint32_t num_tokens)


More information about the Spice-commits mailing list