[PATCH xserver 6/6] dix: Reallocate touchpoint buffer at input event time

Keith Packard keithp at keithp.com
Wed Dec 9 11:46:37 PST 2015


Peter Hutterer <peter.hutterer at who-t.net> writes:


> this hunk took me a while, wouldn't it be easier do do something like:
>     do {
>        for (i = 0, ...) {
>            ...
>        }
>
>        if (!ti)
>            TouchResizeQueue(dev))
>     } while (!ti); 

It's similar, but you still need to deal with the possibility that
TouchResizeQueue can fail. Given that there are two ways out of the loop
(ti != NULL or TouchResizeQueue fails), having the two tests with a
break seems clearer to me, but I guess that's just a matter of opinion.

Thanks for figuring it out.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20151209/cff94324/attachment.sig>


More information about the xorg-devel mailing list