initialize option_name before using it.
authorManish Singh <yosh@gimp.org>
Sat, 28 May 2005 00:19:14 +0000 (00:19 +0000)
committerManish Singh <yosh@src.gnome.org>
Sat, 28 May 2005 00:19:14 +0000 (00:19 +0000)
Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>

        * glib/goption.c (parse_short_option): initialize option_name
        before using it.

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

index 30ba5c9..a671ba5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>
+
+       * glib/goption.c (parse_short_option): initialize option_name
+       before using it.
+
 2005-05-27  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option):
index 30ba5c9..a671ba5 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>
+
+       * glib/goption.c (parse_short_option): initialize option_name
+       before using it.
+
 2005-05-27  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option):
index 30ba5c9..a671ba5 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>
+
+       * glib/goption.c (parse_short_option): initialize option_name
+       before using it.
+
 2005-05-27  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option):
index 30ba5c9..a671ba5 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>
+
+       * glib/goption.c (parse_short_option): initialize option_name
+       before using it.
+
 2005-05-27  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option):
index 4cfd459..60303c5 100644 (file)
@@ -899,6 +899,8 @@ parse_short_option (GOptionContext *context,
 
                  return FALSE;
                }
+
+             option_name = g_strdup_printf ("-%c", group->entries[j].short_name);
              
              if (index < *argc - 1)
                {
@@ -914,8 +916,6 @@ parse_short_option (GOptionContext *context,
                  g_free (option_name);
                  return FALSE;
                }
-
-             option_name = g_strdup_printf ("-%c", group->entries[j].short_name);
              
              if (!parse_arg (context, group, &group->entries[j], value, option_name, error))
                {
@@ -970,7 +970,7 @@ parse_long_option (GOptionContext *context,
 
              add_pending_null (context, &((*argv)[*index]), NULL);
              option_name = g_strconcat ("--", group->entries[j].long_name, NULL);
-                     
+
              if (arg[len] == '=')
                value = arg + len + 1;
              else if (*index < *argc - 1)