[Mesa-dev] [PATCH 3/5] mesa: Add an extra clarifying set of braces to getter checking.

Eric Anholt eric at anholt.net
Wed Apr 10 12:01:12 PDT 2013


For this multi-page single statement, my thought the end was to that the
next block was mis-indented, rather than that the dropped indentation
actually indicated the end of the loop.
---
 src/mesa/main/get.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index c9bef8e..b913311 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -905,7 +905,7 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
    GLboolean api_found = GL_FALSE;
    const int *e;
 
-   for (e = d->extra; *e != EXTRA_END; e++)
+   for (e = d->extra; *e != EXTRA_END; e++) {
       switch (*e) {
       case EXTRA_VERSION_30:
          api_check = GL_TRUE;
@@ -987,6 +987,7 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
 	    api_found = GL_TRUE;
 	 break;
       }
+   }
 
    if (api_check && !api_found) {
       _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
-- 
1.7.10.4



More information about the mesa-dev mailing list