remove unneeded unsigned int / zero comparisons

This commit is contained in:
Brian Paul 2003-04-21 15:04:30 +00:00
parent 7bb832f9f7
commit 464bc3b674
1 changed files with 5 additions and 8 deletions

View File

@ -1,10 +1,8 @@
/* $Id: api_validate.c,v 1.7 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 4.1
* Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -45,8 +43,7 @@ _mesa_validate_DrawElements(GLcontext *ctx,
return GL_FALSE;
}
if (mode < 0 ||
mode > GL_POLYGON) {
if (mode > GL_POLYGON) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
return GL_FALSE;
}
@ -86,7 +83,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
return GL_FALSE;
}
if (mode < 0 || mode > GL_POLYGON) {
if (mode > GL_POLYGON) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
return GL_FALSE;
}
@ -126,7 +123,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
return GL_FALSE;
}
if (mode < 0 || mode > GL_POLYGON) {
if (mode > GL_POLYGON) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
return GL_FALSE;
}