[PATCH 5/9] glx: remove a noop assert (index is unsigned)

Konstantin Kharlamov Hi-Angel at yandex.ru
Sat Mar 23 23:51:59 UTC 2019


Fixes "Pointless comparison of unsigned value to zero."

Signed-off-by: Konstantin Kharlamov <Hi-Angel at yandex.ru>
---
 glx/vndservermapping.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/glx/vndservermapping.c b/glx/vndservermapping.c
index fd3be92d9..143d7bbdd 100644
--- a/glx/vndservermapping.c
+++ b/glx/vndservermapping.c
@@ -127,7 +127,6 @@ GlxContextTagInfo *GlxAllocContextTag(ClientPtr client, GlxServerVendor *vendor)
         cl->contextTagCount = newSize;
     }
 
-    assert(index >= 0);
     assert(index < cl->contextTagCount);
     memset(&cl->contextTags[index], 0, sizeof(GlxContextTagInfo));
     cl->contextTags[index].tag = (GLXContextTag) (index + 1);
-- 
2.21.0



More information about the xorg-devel mailing list