From 052c81faa1147ab758dc4430e4483c7d9fc5fe25 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 1 Mar 2017 22:53:52 +0100 Subject: mesa/main: remove useless check in _mesa_IsSampler() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _mesa_lookup_samplerobj() returns NULL if sampler is 0. v2: use _mesa_lookup...(...) != NULL Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/mesa/main/samplerobj.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 8a0835a23d5..2baa016cd40 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -270,17 +270,11 @@ _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers) GLboolean GLAPIENTRY _mesa_IsSampler(GLuint sampler) { - struct gl_sampler_object *sampObj; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (sampler == 0) - return GL_FALSE; - - sampObj = _mesa_lookup_samplerobj(ctx, sampler); - - return sampObj != NULL; + return _mesa_lookup_samplerobj(ctx, sampler) != NULL; } void -- cgit v1.2.3