glsl: Don't declare variables in for-loop declaration.
authorMatt Turner <mattst88@gmail.com>
Tue, 15 Jul 2014 19:13:22 +0000 (12:13 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 15 Jul 2014 19:17:48 +0000 (12:17 -0700)
Reported-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glsl/list.h

index 3cc48ce..3ee6cda 100644 (file)
@@ -411,9 +411,9 @@ static inline unsigned
 exec_list_length(const struct exec_list *list)
 {
    unsigned size = 0;
+   struct exec_node *node;
 
-   for (struct exec_node *node = list->head; node->next != NULL;
-       node = node->next) {
+   for (node = list->head; node->next != NULL; node = node->next) {
       size++;
    }