summaryrefslogtreecommitdiffstats
path: root/server/main_channel.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-03-09 12:49:26 +0100
committerHans de Goede <hdegoede@redhat.com>2012-03-10 11:51:54 +0100
commitf24203e122c756e3b3ee540c718409451e4f9458 (patch)
tree0d30f319bea9cd6d811fbf1fdb875968cb0d4ef0 /server/main_channel.c
parent1029e7fd4d2ba837d5b14a4b8d93b6a9c4ab75ac (diff)
downloadspice-f24203e122c756e3b3ee540c718409451e4f9458.tar.gz
spice-f24203e122c756e3b3ee540c718409451e4f9458.tar.xz
spice-f24203e122c756e3b3ee540c718409451e4f9458.zip
Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL
While git-bisecting another issue I ended up hitting and not recognizing the bug fixed by commit 7a079b452b026d6ce38f95dcc397fa64b059fffb. While fixing this (again) I noticed that (even after the fix) not all users of ChannelCbs first zero it. So this patch ensures that all users of ChannelCbs first zero it, and does the same for ClientCbs while at it. Since before this patch there were multiple zero-ing styles, some using memset and other using a zero initializer this patch also unifies all the zero-ing to use a NULL initializer for the first element. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'server/main_channel.c')
-rw-r--r--server/main_channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index a871bc8c..a9fd24ef 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -1062,7 +1062,7 @@ uint64_t main_channel_client_get_bitrate_per_sec(MainChannelClient *mcc)
MainChannel* main_channel_init(void)
{
RedChannel *channel;
- ChannelCbs channel_cbs = {0,};
+ ChannelCbs channel_cbs = { NULL, };
channel_cbs.config_socket = main_channel_config_socket;
channel_cbs.on_disconnect = main_channel_client_on_disconnect;