[PATCH 01/11] xfree86: Iterate tags attributes array correctly

Jamey Sharp jamey at minilop.net
Thu May 20 09:25:42 PDT 2010


That looks like an important bugfix for the matchers. It'd mean, what,
only a suffix of the first tag on a device could match? I'd have liked
to see a note in the commit message about how you can test for this
bug; among other things that would make it easier to decide if this
looks like a correct fix.

Assuming I've interpreted this correctly,
Reviewed-by: Jamey Sharp <jamey at minilop.net>

On Thu, May 20, 2010 at 7:09 AM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> Incrementing a char * is not the same as char **.
>
> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
> ---
>  hw/xfree86/common/xf86Xinput.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index ac287aa..ba83f24 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -551,9 +551,9 @@ InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs)
>             return FALSE;
>
>         for (cur = iclass->match_tag, match = FALSE; *cur && !match; cur++) {
> -            const char *tag;
> -            for(tag = *attrs->tags; *tag; tag++) {
> -                if (!strcmp(tag, *cur)) {
> +            char **tag;
> +            for(tag = attrs->tags; *tag; tag++) {
> +                if (!strcmp(*tag, *cur)) {
>                     match = TRUE;
>                     break;
>                 }
> --
> 1.6.6.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>


More information about the xorg-devel mailing list