summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-01-02 16:56:12 -0700
committerBrian Paul <[email protected]>2015-01-05 13:50:54 -0700
commitd0fa559e49799a13e56b65aa3c389e70926455c9 (patch)
treec669bf18bee5029b28ce16eae926d052aadac717 /src/mesa/main/shaderapi.c
parentc0a445037bf3453c60dd060894539e31223fb821 (diff)
mesa: simplify a conditional in detach_shader()
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index e38189cda41..e5e9cabc3ed 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;