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> 2005-05-27 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_short_option, parse_long_option): * 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> 2005-05-27 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_short_option, parse_long_option): * 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> 2005-05-27 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_short_option, parse_long_option): * 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> 2005-05-27 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_short_option, parse_long_option): * glib/goption.c (parse_short_option, parse_long_option):

View File

@ -900,6 +900,8 @@ parse_short_option (GOptionContext *context,
return FALSE; return FALSE;
} }
option_name = g_strdup_printf ("-%c", group->entries[j].short_name);
if (index < *argc - 1) if (index < *argc - 1)
{ {
value = (*argv)[index + 1]; value = (*argv)[index + 1];
@ -915,8 +917,6 @@ parse_short_option (GOptionContext *context,
return FALSE; 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)) if (!parse_arg (context, group, &group->entries[j], value, option_name, error))
{ {
g_free (option_name); g_free (option_name);