projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0a4450
)
mesa: simplify a conditional in detach_shader()
author
Brian Paul
<brianp@vmware.com>
Fri, 2 Jan 2015 23:56:12 +0000
(16:56 -0700)
committer
Brian 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
patch
|
blob
|
history
diff --git
a/src/mesa/main/shaderapi.c
b/src/mesa/main/shaderapi.c
index e38189cda41b578538a9e89ea534b0c48977c2d8..e5e9cabc3edc758a045dfb37118718c39a6193c1 100644
(file)
--- 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;