On Mon, 6 Dec 2010 14:53:23 -0800, James Jones <[email protected]> wrote:

> +         if (pTrigger->test_type != XSyncPositiveTransition &&
> +             pTrigger->test_type != XSyncNegativeTransition &&
> +             pTrigger->test_type != XSyncPositiveComparison &&
> +             pTrigger->test_type != XSyncNegativeComparison)
> +         {
> +             client->errorValue = pTrigger->test_type;
> +             return BadValue;
> +         }
> +         /* select appropriate CheckTrigger function */
> +
> +         switch (pTrigger->test_type)
> +         {
> +         case XSyncPositiveTransition:
> +             pTrigger->CheckTrigger = SyncCheckTriggerPositiveTransition;
> +             break;
> +         case XSyncNegativeTransition:
> +             pTrigger->CheckTrigger = SyncCheckTriggerNegativeTransition;
> +             break;
> +         case XSyncPositiveComparison:
> +             pTrigger->CheckTrigger = SyncCheckTriggerPositiveComparison;
> +             break;
> +         case XSyncNegativeComparison:
> +             pTrigger->CheckTrigger = SyncCheckTriggerNegativeComparison;
> +             break;
> +         }

Gah! default: would have been too tricky here? I know this is copied
From the original code, but it's horrible.


> +    pAwait = &(pAwaitUnion+1)->await; /* skip over header */
> +    for (i = 0; i < items; i++, pProtocolFences++, pAwait++)
> +    {
> +     if (*pProtocolFences == None) /* XXX protocol change */

Ur? Is this missing from the protocol spec?

Reviewed-by: Keith Packard <[email protected]>

-- 
[email protected]

Attachment: pgpAFFvib69zs.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to