On Wed, Jun 03, 2015 at 03:53:25PM -0500, Derek Foreman wrote: > Use early return for a slight simplification. > > Signed-off-by: Derek Foreman <[email protected]>
Reviewed-by: Jonas Ådahl <[email protected]> > --- > src/compositor-drm.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/compositor-drm.c b/src/compositor-drm.c > index bf921be..b13e0c0 100644 > --- a/src/compositor-drm.c > +++ b/src/compositor-drm.c > @@ -1934,10 +1934,12 @@ setup_output_seat_constraint(struct drm_compositor > *ec, > struct udev_seat *seat; > > seat = udev_seat_get_named(&ec->input, s); > - if (seat) > - seat->base.output = output; > + if (!seat) > + return; > + > + seat->base.output = output; > > - if (seat && seat->base.pointer) > + if (seat->base.pointer) > weston_pointer_clamp(seat->base.pointer, > &seat->base.pointer->x, > &seat->base.pointer->y); > -- > 2.1.4 > > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
