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 3cc48cef644660944e7f3b1dcbb88bd48a0e9c70..3ee6cdaa9a97579efa2c9e693cf3c7a1cd50648e 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++;
    }