Set errno to 0 before calling strtol. (#306388, Morten Welinder)

2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_int): Set errno to 0 before calling
	strtol.  (#306388, Morten Welinder)
This commit is contained in:
Matthias Clasen 2005-06-09 15:37:47 +00:00 committed by Matthias Clasen
parent 1d28558146
commit c931e6aa16
5 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-06-09 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_int): Set errno to 0 before calling
strtol. (#306388, Morten Welinder)
2005-06-08 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (get_windows_directory_root): New helper function

View File

@ -1,3 +1,8 @@
2005-06-09 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_int): Set errno to 0 before calling
strtol. (#306388, Morten Welinder)
2005-06-08 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (get_windows_directory_root): New helper function

View File

@ -1,3 +1,8 @@
2005-06-09 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_int): Set errno to 0 before calling
strtol. (#306388, Morten Welinder)
2005-06-08 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (get_windows_directory_root): New helper function

View File

@ -1,3 +1,8 @@
2005-06-09 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (parse_int): Set errno to 0 before calling
strtol. (#306388, Morten Welinder)
2005-06-08 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (get_windows_directory_root): New helper function

View File

@ -610,10 +610,11 @@ parse_int (const gchar *arg_name,
GError **error)
{
gchar *end;
glong tmp = strtol (arg, &end, 0);
glong tmp;
errno = 0;
tmp = strtol (arg, &end, 0);
if (*arg == '\0' || *end != '\0')
{
g_set_error (error,