[Mesa-dev] [PATCH 07/12] mesa: simplify a conditional in detach_shader()
Brian Paul
brianp at vmware.com
Fri Jan 2 16:54:57 PST 2015
---
src/mesa/main/shaderapi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index e38189c..e5e9cab 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -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;
--
1.9.1
More information about the mesa-dev
mailing list