Mesa (master): meta: Initialize the variable in declaration statement

Anuj Phogat aphogat at kemper.freedesktop.org
Tue Aug 5 01:32:11 UTC 2014


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

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Wed Jun 11 17:57:30 2014 -0700

meta: Initialize the variable in declaration statement

Saves one line of code :)

Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

---

 src/mesa/drivers/common/meta.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 606b604..a2a7b2d 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2732,9 +2732,7 @@ _mesa_meta_blit_shader_table_cleanup(struct blit_shader_table *table)
 static GLenum
 get_temp_image_type(struct gl_context *ctx, mesa_format format)
 {
-   GLenum baseFormat;
-
-   baseFormat = _mesa_get_format_base_format(format);
+   const GLenum baseFormat = _mesa_get_format_base_format(format);
 
    switch (baseFormat) {
    case GL_RGBA:




More information about the mesa-commit mailing list