mesa: small _mesa_UseProgram() tidy up
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 3 May 2017 05:56:03 +0000 (15:56 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 11 May 2017 00:56:09 +0000 (10:56 +1000)
Makes the code easier to follow.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/shaderapi.c

index c41f006eb79c589e7f671bea9f6bc63cea3adb26..681b7306d13135b07df81aed4324148dddce2489 100644 (file)
@@ -1856,7 +1856,7 @@ void GLAPIENTRY
 _mesa_UseProgram(GLuint program)
 {
    GET_CURRENT_CONTEXT(ctx);
-   struct gl_shader_program *shProg;
+   struct gl_shader_program *shProg = NULL;
 
    if (MESA_VERBOSE & VERBOSE_API)
       _mesa_debug(ctx, "glUseProgram %u\n", program);
@@ -1883,9 +1883,6 @@ _mesa_UseProgram(GLuint program)
          print_shader_info(shProg);
       }
    }
-   else {
-      shProg = NULL;
-   }
 
    /* The ARB_separate_shader_object spec says:
     *