From: Brian Paul Date: Fri, 2 Jan 2015 23:56:12 +0000 (-0700) Subject: mesa: simplify a conditional in detach_shader() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0fa559e49799a13e56b65aa3c389e70926455c9;p=mesa.git mesa: simplify a conditional in detach_shader() Reviewed-by: Eric Anholt --- 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;