Re: [PATCH spice-gtk] Use g_return_val_if_fail instead of wrong g_return_if_fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2015 at 07:59:35PM +0200, Pavel Grunt wrote:
> The commit 4b5e6ec2114e1250c81027ebeac9cfe8d059153f introduced a function
> returning gboolean, g_return_val_if_fail() should be used instead of
> g_return_if_fail().
> ---
>  src/channel-main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/channel-main.c b/src/channel-main.c
> index 3bd5a02..1b9c4d4 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -1420,7 +1420,7 @@ static gboolean any_display_has_dimensions(SpiceMainChannel *channel)
>      SpiceMainChannelPrivate *c;
>      guint i;
>
> -    g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel));
> +    g_return_val_if_fail(SPICE_IS_MAIN_CHANNEL(channel), FALSE);

Looks ok!

>      c = channel->priv;
>
>      for (i = 0; i < MAX_DISPLAY; i++) {
> --
> 2.4.5
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]