From: Matthias Clasen Date: Wed, 20 Oct 2004 06:04:18 +0000 (+0000) Subject: Don't return the wrong change. (#155856, Lucas Rocha) X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=e96fe301fad3720a3ab2c87412d46e36643b00ff;p=dana%2Fcg-glib.git Don't return the wrong change. (#155856, Lucas Rocha) 2004-10-20 Matthias Clasen * glib/goption.c (get_change): Don't return the wrong change. (#155856, Lucas Rocha) --- diff --git a/ChangeLog b/ChangeLog index 00de45dd..ba58798f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-20 Matthias Clasen + + * glib/goption.c (get_change): Don't return the wrong + change. (#155856, Lucas Rocha) + 2004-10-17 Matthias Clasen * glib/gutils.h (G_IS_DIR_SEPARATOR): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 00de45dd..ba58798f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-10-20 Matthias Clasen + + * glib/goption.c (get_change): Don't return the wrong + change. (#155856, Lucas Rocha) + 2004-10-17 Matthias Clasen * glib/gutils.h (G_IS_DIR_SEPARATOR): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 00de45dd..ba58798f 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2004-10-20 Matthias Clasen + + * glib/goption.c (get_change): Don't return the wrong + change. (#155856, Lucas Rocha) + 2004-10-17 Matthias Clasen * glib/gutils.h (G_IS_DIR_SEPARATOR): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 00de45dd..ba58798f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-10-20 Matthias Clasen + + * glib/goption.c (get_change): Don't return the wrong + change. (#155856, Lucas Rocha) + 2004-10-17 Matthias Clasen * glib/gutils.h (G_IS_DIR_SEPARATOR): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 00de45dd..ba58798f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-10-20 Matthias Clasen + + * glib/goption.c (get_change): Don't return the wrong + change. (#155856, Lucas Rocha) + 2004-10-17 Matthias Clasen * glib/gutils.h (G_IS_DIR_SEPARATOR): diff --git a/glib/goption.c b/glib/goption.c index 8001bad3..9efb3185 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -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; }