[PATCH:libXi] Remove check that can never be true.

Peter Hutterer peter.hutterer at who-t.net
Thu Jun 27 15:24:34 PDT 2013


On Thu, Jun 27, 2013 at 09:24:29AM -0700, Alan Coopersmith wrote:
> On 06/27/13 08:16 AM, Thomas Klausner wrote:
> >clang warns:
> >warning: comparison of constant 268435455 with expression of type
> >'CARD16' (aka 'unsigned short') is always false
> >---
> >  src/XGetFCtl.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> >diff --git a/src/XGetFCtl.c b/src/XGetFCtl.c
> >index bb50bf3..2d71fab 100644
> >--- a/src/XGetFCtl.c
> >+++ b/src/XGetFCtl.c
> >@@ -125,9 +125,6 @@ XGetFeedbackControl(
> >  	    case StringFeedbackClass:
> >  	    {
> >  		xStringFeedbackState *strf = (xStringFeedbackState *) f;
> >-
> >-		if (strf->num_syms_supported >= (INT_MAX / sizeof(KeySym)))
> >-		    goto out;
> >  		size += sizeof(XStringFeedbackState) +
> >  		    (strf->num_syms_supported * sizeof(KeySym));
> >  	    }
> >
> 
> Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

thanks to both of you!
 
    957a9d6..d804af9  master -> master

Cheers,
   Peter


More information about the xorg-devel mailing list