[totem-pl-parser] Fix use of the wrong iterator in loop



commit 916df6eb174a4cefc925d5786ee90cb295048bfe
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Apr 11 22:51:22 2010 +0100

    Fix use of the wrong iterator in loop

 plparse/totem-pl-parser.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index 96ed739..5300643 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1852,7 +1852,8 @@ totem_pl_parser_parse_internal (TotemPlParser *parser,
 
 		for (i = 0; i < G_N_ELEMENTS(dual_types) && found == FALSE; i++) {
 			if (strcmp (dual_types[i].mimetype, mimetype) == 0) {
-				int j, new_i;
+				guint j;
+				int new_i;
 
 				DEBUG(file, g_print ("URI '%s' is dual type '%s'\n", uri, mimetype));
 				if (data == NULL) {
@@ -1869,7 +1870,7 @@ totem_pl_parser_parse_internal (TotemPlParser *parser,
 				}
 				/* Now look for the proper function to use */
 				new_i = -1;
-				for (j = 0; i < G_N_ELEMENTS(dual_types) && mimetype != NULL; j++) {
+				for (j = 0; j < G_N_ELEMENTS(dual_types) && mimetype != NULL; j++) {
 					if (strcmp (dual_types[j].mimetype, mimetype) == 0) {
 						new_i = j;
 						break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]