Don't return the wrong change. (#155856, Lucas Rocha)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 20 Oct 2004 06:04:18 +0000 (06:04 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 20 Oct 2004 06:04:18 +0000 (06:04 +0000)
2004-10-20  Matthias Clasen  <mclasen@redhat.com>

* glib/goption.c (get_change): Don't return the wrong
change.  (#155856, Lucas Rocha)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/goption.c

index 00de45d..ba58798 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (get_change): Don't return the wrong 
+       change.  (#155856, Lucas Rocha)
+
 2004-10-17  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/gutils.h (G_IS_DIR_SEPARATOR): 
index 00de45d..ba58798 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (get_change): Don't return the wrong 
+       change.  (#155856, Lucas Rocha)
+
 2004-10-17  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/gutils.h (G_IS_DIR_SEPARATOR): 
index 00de45d..ba58798 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (get_change): Don't return the wrong 
+       change.  (#155856, Lucas Rocha)
+
 2004-10-17  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/gutils.h (G_IS_DIR_SEPARATOR): 
index 00de45d..ba58798 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (get_change): Don't return the wrong 
+       change.  (#155856, Lucas Rocha)
+
 2004-10-17  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/gutils.h (G_IS_DIR_SEPARATOR): 
index 00de45d..ba58798 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (get_change): Don't return the wrong 
+       change.  (#155856, Lucas Rocha)
+
 2004-10-17  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/gutils.h (G_IS_DIR_SEPARATOR): 
index 8001bad..9efb318 100644 (file)
@@ -428,18 +428,17 @@ get_change (GOptionContext *context,
       change = list->data;
 
       if (change->arg_data == arg_data)
-       break;
+       goto found;
     }
 
-  if (!change)
-    {
-      change = g_new0 (Change, 1);
-      change->arg_type = arg_type;
-      change->arg_data = arg_data;
-
-      context->changes = g_list_prepend (context->changes, change);
-    }
+  change = g_new0 (Change, 1);
+  change->arg_type = arg_type;
+  change->arg_data = arg_data;
+  
+  context->changes = g_list_prepend (context->changes, change);
   
+ found:
+
   return change;
 }