Mesa (master): glsl: Don't declare variables in for-loop declaration.
Matt Turner
mattst88 at kemper.freedesktop.org
Tue Jul 15 19:16:26 UTC 2014
Module: Mesa
Branch: master
Commit: c11096c7497d12b54ace8709e696fcb823de9444
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c11096c7497d12b54ace8709e696fcb823de9444
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Jul 15 12:13:22 2014 -0700
glsl: Don't declare variables in for-loop declaration.
Reported-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/glsl/list.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/glsl/list.h b/src/glsl/list.h
index 3cc48ce..3ee6cda 100644
--- a/src/glsl/list.h
+++ b/src/glsl/list.h
@@ -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++;
}
More information about the mesa-commit
mailing list