On Sun, Dec 08, 2013 at 01:10:26PM -0800, Alan Coopersmith wrote:
> We just want to know if XkbQueryExtension returned false, so ! is enough,
> don't need > 0 as well.
> 
> Reported by cppcheck:
> [app/xkbutils/xkbbell.c:205]: (warning) Comparison of a boolean value
>  using relational operator (<, >, <= or >=).
> 
> Signed-off-by: Alan Coopersmith <[email protected]>

Reviewed-by: Peter Hutterer <[email protected]>

Cheers,
   Peter

> ---
>  xkbbell.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xkbbell.c b/xkbbell.c
> index ac06b35..95b8604 100644
> --- a/xkbbell.c
> +++ b/xkbbell.c
> @@ -202,7 +202,7 @@ main(int argc, char *argv[])
>                  XkbMajorVersion, XkbMinorVersion);
>          fprintf(stderr, "         Trying anyway\n");
>      }
> -    if (!XkbQueryExtension(dpy, &i1, &i2, &i3, &i4, &i5) > 0) {
> +    if (!XkbQueryExtension(dpy, &i1, &i2, &i3, &i4, &i5)) {
>          if ((i4 != 0) || (i5 != 0))
>              fprintf(stderr,
>                      "server supports incompatible XKB version %d.%02d\n", i4,
> -- 
> 1.7.9.2
> 
> _______________________________________________
> [email protected]: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 
_______________________________________________
[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