[Spice-commits] server/reds.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Aug 25 12:15:04 UTC 2017
server/reds.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
New commits:
commit dcc9c1875933919142b36b4cd2557ea00c2b6438
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Aug 25 09:45:53 2017 +0100
reds: Inline very simple function
reds_get_n_clients is a single line and is used only by
spice_server_get_num_clients.
The 2 functions have very similar names so inlining
reds_get_n_clients does not make code less readable.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/reds.c b/server/reds.c
index 84c2e466..a738afc3 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -924,14 +924,9 @@ void reds_handle_agent_mouse_event(RedsState *reds, const VDAgentMouseState *mou
red_char_device_write_buffer_add(RED_CHAR_DEVICE(reds->agent_dev), char_dev_buf);
}
-static int reds_get_n_clients(RedsState *reds)
-{
- return reds ? g_list_length(reds->clients) : 0;
-}
-
SPICE_GNUC_VISIBLE int spice_server_get_num_clients(SpiceServer *reds)
{
- return reds_get_n_clients(reds);
+ return reds ? g_list_length(reds->clients) : 0;
}
static bool channel_supports_multiple_clients(RedChannel *channel)
More information about the Spice-commits
mailing list