Mesa (master): main: Remove comparison unsigned int >= 0.

Laura Ekstrand ldeks at kemper.freedesktop.org
Mon Jan 12 18:24:10 UTC 2015


Module: Mesa
Branch: master
Commit: 0e6f0eea1aae95213b359662495142fc7b88c34f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e6f0eea1aae95213b359662495142fc7b88c34f

Author: Laura Ekstrand <laura at jlekstrand.net>
Date:   Mon Jan 12 09:52:05 2015 -0800

main: Remove comparison unsigned int >= 0.

Fixes "macro compares unsigned to 0 (NO_EFFECT)" found by Coverity Scan.

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/main/texstate.h |    1 -
 1 file changed, 1 deletion(-)

diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index 2514d10..abc07ea 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -41,7 +41,6 @@
 static inline struct gl_texture_unit *
 _mesa_get_tex_unit(struct gl_context *ctx, GLuint unit)
 {
-   ASSERT(unit >= 0);
    ASSERT(unit < Elements(ctx->Texture.Unit));
    return &(ctx->Texture.Unit[unit]);
 }




More information about the mesa-commit mailing list