[Piglit] [PATCH] arb_uniform_buffer_object: Remove unsigned comparison against 0.

Vinson Lee vlee at freedesktop.org
Sat Dec 15 00:03:16 PST 2012


indices[i] has type GLuint.

Fixes unsigned compared against 0 defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_uniform_buffer_object/getuniformindices.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/spec/arb_uniform_buffer_object/getuniformindices.c b/tests/spec/arb_uniform_buffer_object/getuniformindices.c
index 2c43466..b513c73 100644
--- a/tests/spec/arb_uniform_buffer_object/getuniformindices.c
+++ b/tests/spec/arb_uniform_buffer_object/getuniformindices.c
@@ -119,8 +119,7 @@ piglit_init(int argc, char **argv)
 
 	for (i = 0; i < 3; i++) {
 		printf("%s: index %d\n", uniform_names[i], indices[i]);
-		if (indices[i] < 0 || indices[i] > 2 ||
-		    found_index[indices[i]]) {
+		if (indices[i] > 2 || found_index[indices[i]]) {
 			printf("Expected consecutive numbers starting from 0\n");
 			pass = false;
 		}
-- 
1.8.0.1



More information about the Piglit mailing list