mesa: simplify a conditional in detach_shader()
authorBrian Paul <brianp@vmware.com>
Fri, 2 Jan 2015 23:56:12 +0000 (16:56 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 5 Jan 2015 20:50:54 +0000 (13:50 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/shaderapi.c

index e38189cda41b578538a9e89ea534b0c48977c2d8..e5e9cabc3edc758a045dfb37118718c39a6193c1 100644 (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;