initialize option_name before using it.

Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>

        * glib/goption.c (parse_short_option): initialize option_name
        before using it.
This commit is contained in:
Manish Singh 2005-05-28 00:19:14 +00:00 committed by Manish Singh
parent 4c4f106344
commit ba5a4d9db6
5 changed files with 23 additions and 3 deletions

View 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):

View 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):

View 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):

View 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):

View 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)