[PATCH] exa: fix gnome-panel corruption

Michel Dänzer michel at daenzer.net
Mon Feb 15 07:42:34 PST 2010


On Mon, 2010-02-15 at 16:40 +0100, Maarten Maathuis wrote: 
> 2010/2/15 Michel Dänzer <michel at daenzer.net>:
> > On Thu, 2010-02-11 at 20:06 +0100, Maarten Maathuis wrote:
> >> 2010/2/11 Michel Dänzer <michel at daenzer.net>:
> >> >
> >> > It should be possible to restructure the code such that the late_failure
> >> > label and goto aren't necessary.
> >>
> >> You cannot assume the prepare access to succeed the 2nd time, although
> >> it will in 99.99% of the time.
> >
> > No such assumption is necessary:
> >
> >      * Call ExaDoPrepareAccess().
> >      * On success, do the new thing, call ExaDoPrepareAccess() again.
> >      * Take the current failure path if either ExaDoPrepareAccess()
> >        call failed.
> 
> But that will mean you need a goto, a for loop (in the beginning),
> code duplication or something else. I just took the goto as least
> invasive.

A local boolean variable to store the ExaDoPrepareAccess() return value
should do just fine.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list