[totem-pl-parser/gnome-2-28] Fix use of the wrong iterator in loop



commit 7a1178f94b33f90b4368bf4b4d9d28d1691fec69
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 c3981bd..caa286d 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1889,7 +1889,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) {
@@ -1906,7 +1907,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]