From d0fa559e49799a13e56b65aa3c389e70926455c9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Jan 2015 16:56:12 -0700 Subject: [PATCH] mesa: simplify a conditional in detach_shader() Reviewed-by: Eric Anholt --- 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 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; -- 2.30.2