Matt Turner wrote:
> --- a/xkb/ddxList.c
> +++ b/xkb/ddxList.c
> @@ -208,10 +208,8 @@ char     tmpname[PATH_MAX];
>       return BadImplementation;
>      }
>      list->nFound[what]= 0;
> -    if (buf) {
> -        free(buf);
> -        buf = NULL;
> -    }
> +    free(buf);
> +    buf = NULL;
>      buf = malloc(PATH_MAX * sizeof(char));
>      if (!buf)
>          return BadAlloc;

While you didn't introduce it, you could get rid of the buf = NULL setting,
though presumably the compiler optimizes it away when it sees buf overwritten
on the next line without ever referencing the NULL pointer.

Even with that tiny nit,
Reviewed-by: Alan Coopersmith <[email protected]>

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[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