mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-10 06:56:06 +00:00
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:
parent
8cdea23d1d
commit
dcc9c18759
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user