Re: [PATCH spice-gtk 2/5] widget: minor code style improvements

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

 



On Thu, 2017-06-08 at 03:54 -0400, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
> > On Thu, 2017-06-08 at 00:55 +0400, marcandre.lureau@xxxxxxxxxx
> > wrote:
> > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > > 
> > > Use shorter line, use the common "d" variable for private data
> > > access,
> > 
> > just to make the line shorter?
> > 
> > > add brackets to ease reading the inner block vs the condition,
> > > remove
> > > needless != NULL.
> > 
> > we keep the comparison explicit when it is not boolean
> 
> ok,
> ack with that change?

yes, ack with keeping != NULL

Pavel

> 
> > 
> > Pavel
> > > spice_display_get_gl_scanout
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > > ---
> > >  src/spice-widget.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/src/spice-widget.c b/src/spice-widget.c
> > > index 1a1d5a6..d948c6d 100644
> > > --- a/src/spice-widget.c
> > > +++ b/src/spice-widget.c
> > > @@ -617,10 +617,12 @@ drawing_area_realize(GtkWidget *area,
> > > gpointer
> > > user_data)
> > >  {
> > >  #ifdef GDK_WINDOWING_X11
> > >      SpiceDisplay *display = SPICE_DISPLAY(user_data);
> > > +    SpiceDisplayPrivate *d = display->priv;
> > >  
> > >      if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) &&
> > > -        spice_display_get_gl_scanout(SPICE_DISPLAY_CHANNEL(disp
> > > lay-
> > > > priv->display)) != NULL)
> > > 
> > > +        spice_display_get_gl_scanout(SPICE_DISPLAY_CHANNEL(d-
> > > > display))) {
> > > 
> > >          spice_display_widget_gl_scanout(display);
> > > +    }
> > >  
> > >  #endif
> > >  }
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]