2007-04-27 Jonathan Chambers <joncham@gmail.com>
[mono.git] / eglib / test / list.c
index ff14a93c119097c1a6c97eedf68a89f0b3f4a1c8..9558781be63b70ebc9fa56c61c74f07bab98798b 100644 (file)
@@ -315,10 +315,12 @@ static int intcompare (gconstpointer p1, gconstpointer p2)
 
 static gboolean verify_sort (GList *list, int len)
 {
+       int prev;
+
        if (list->prev)
                return FALSE;
 
-       int prev = GPOINTER_TO_INT (list->data);
+       prev = GPOINTER_TO_INT (list->data);
        len--;
        for (list = list->next; list; list = list->next) {
                int curr = GPOINTER_TO_INT (list->data);