On Mon, 2010-02-15 at 16:40 +0100, Maarten Maathuis wrote: 
> 2010/2/15 Michel Dänzer <[email protected]>:
> > On Thu, 2010-02-11 at 20:06 +0100, Maarten Maathuis wrote:
> >> 2010/2/11 Michel Dänzer <[email protected]>:
> >> >
> >> > 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
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to