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@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-08-25 09:45:53 +01:00
parent 8cdea23d1d
commit dcc9c18759

View File

@ -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)