mesa: simplify a conditional in detach_shader()

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Brian Paul
2015-01-02 16:56:12 -07:00
parent c0a445037b
commit d0fa559e49
+1 -3
View File
@@ -431,9 +431,7 @@ detach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
/* not found */
{
GLenum err;
if (is_shader(ctx, shader))
err = GL_INVALID_OPERATION;
else if (is_program(ctx, shader))
if (is_shader(ctx, shader) || is_program(ctx, shader))
err = GL_INVALID_OPERATION;
else
err = GL_INVALID_VALUE;