[Spice-devel] [PATCH spice-server 2/3] sound: Do not pass unused pointer

Frediano Ziglio fziglio at redhat.com
Fri Aug 25 10:24:40 UTC 2017


Client callbacks in sound channels do not use registered
data so don't pass a valid pointer making clear from
source that the parameter is not used.

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

diff --git a/server/sound.c b/server/sound.c
index 54b89713..673f6330 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -1339,7 +1339,7 @@ playback_channel_constructed(GObject *object)
 
     client_cbs.connect = snd_set_playback_peer;
     client_cbs.migrate = snd_migrate_channel_client;
-    red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, self);
+    red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
 
     if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, SND_CODEC_ANY_FREQUENCY)) {
         red_channel_set_cap(RED_CHANNEL(self), SPICE_PLAYBACK_CAP_CELT_0_5_1);
@@ -1389,7 +1389,7 @@ record_channel_constructed(GObject *object)
 
     client_cbs.connect = snd_set_record_peer;
     client_cbs.migrate = snd_migrate_channel_client;
-    red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, self);
+    red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, NULL);
 
     if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, SND_CODEC_ANY_FREQUENCY)) {
         red_channel_set_cap(RED_CHANNEL(self), SPICE_RECORD_CAP_CELT_0_5_1);
-- 
2.13.5



More information about the Spice-devel mailing list