[Spice-devel] [spice-server] display-channel: Make monitors_config_new() static
Frediano Ziglio
fziglio at redhat.com
Tue Feb 28 16:57:10 UTC 2017
>
> It's only used in display-channel.c
>
> Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
There are also:
- glz_enc_dictionary_reset
- red_channel_any_blocked
- red_channel_no_item_being_sent
- red_client_get_channel
- reds_stream_write
This mainly bring some optimization due to the static,
not much encapsulation, the structure is quite public.
Frediano
> ---
> server/display-channel.c | 2 +-
> server/display-channel.h | 2 --
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 288969c..5581b9a 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -150,7 +150,7 @@ static void monitors_config_debug(MonitorsConfig *mc)
> mc->heads[i].width, mc->heads[i].height);
> }
>
> -MonitorsConfig* monitors_config_new(QXLHead *heads, ssize_t nheads, ssize_t
> max)
> +static MonitorsConfig* monitors_config_new(QXLHead *heads, ssize_t nheads,
> ssize_t max)
> {
> MonitorsConfig *mc;
>
> diff --git a/server/display-channel.h b/server/display-channel.h
> index 3d4accf..5604fc5 100644
> --- a/server/display-channel.h
> +++ b/server/display-channel.h
> @@ -140,8 +140,6 @@ typedef struct RedMonitorsConfigItem {
> MonitorsConfig *monitors_config;
> } RedMonitorsConfigItem;
>
> -MonitorsConfig* monitors_config_new
> (QXLHead *heads, ssize_t nheads,
> -
> ssize_t
> max);
> MonitorsConfig * monitors_config_ref
> (MonitorsConfig *config);
> void monitors_config_unref
> (MonitorsConfig *config);
>
More information about the Spice-devel
mailing list