[Spice-devel] [PATCH 07/15] Change init_vd_agent_resources() to take RedsState arg
Frediano Ziglio
fziglio at redhat.com
Fri Jan 22 04:17:48 PST 2016
>
> From: Jonathon Jongsma <jjongsma at redhat.com>
>
> ---
> server/reds.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/server/reds.c b/server/reds.c
> index 36354a6..b108cc8 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3327,7 +3327,7 @@ SPICE_GNUC_VISIBLE int
> spice_server_remove_interface(SpiceBaseInstance *sin)
> return 0;
> }
>
> -static void init_vd_agent_resources(void)
> +static void reds_init_vd_agent_resources(RedsState *reds)
> {
> VDIPortState *state = &reds->agent_state;
> int i;
> @@ -3363,7 +3363,7 @@ static int do_spice_init(RedsState *reds,
> SpiceCoreInterface *core_interface)
> core = &core_interface_adapter;
> reds->listen_socket = -1;
> reds->secure_listen_socket = -1;
> - init_vd_agent_resources();
> + reds_init_vd_agent_resources(reds);
> ring_init(&reds->clients);
> reds->num_clients = 0;
> main_dispatcher_init(core);
This also changes function name.
As a small static function I don't see much gain adding the reds_ prefix.
Frediano
More information about the Spice-devel
mailing list