Re: [PATCH 02/18] worker: remove current_add assert

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

 



> 
> On Wed, Nov 18, 2015 at 10:54 PM, Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> wrote:
> > Not much value in this change at the moment. Both versions will result in
> > an
> > abort by default. I think in this case, it's better to avoid the abort
> > since
> > this function has a way to indicate failure (by returning FALSE). So I'd
> > suggest
> > converting this one to g_return_val_if_fail().
> 
> I basically agree with Jonathon here. OTOH, I do believe that adding
> g_return_* must be done later on ... but that's just my opinion.
> NACK this patch.
> 

Agreed with the NACK.

I think we should open a thread to discuss the spice_return and g_return

Frediano

> >
> >
> >
> > On Wed, 2015-11-18 at 16:17 +0000, Frediano Ziglio wrote:
> >> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> >>
> >> ---
> >>  server/display-channel.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/server/display-channel.c b/server/display-channel.c
> >> index d4fcc7e..aed2080 100644
> >> --- a/server/display-channel.c
> >> +++ b/server/display-channel.c
> >> @@ -736,7 +736,7 @@ static int current_add(DisplayChannel *display, Ring
> >> *ring, Drawable *drawable)
> >>      RingItem *exclude_base = NULL;
> >>      stat_start(display, start_time);
> >>
> >> -    spice_assert(!region_is_empty(&item->base.rgn));
> >> +    spice_return_val_if_fail(!region_is_empty(&item->base.rgn), FALSE);
> >>      region_init(&exclude_rgn);
> >>      now = ring_next(ring, ring);
> >>
_______________________________________________
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]