mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
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:
parent
f15bb122ce
commit
e90cd618b1
@ -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-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/gstdio.h
|
||||
|
@ -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-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/gstdio.h
|
||||
|
@ -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-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/gstdio.h
|
||||
|
@ -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-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/gstdio.h
|
||||
|
@ -33,18 +33,22 @@
|
||||
|
||||
#define TRANSLATE(group, str) (((group)->translate_func ? (* (group)->translate_func) ((str), (group)->translate_data) : (str)))
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
GOptionArg arg_type;
|
||||
gpointer arg_data;
|
||||
union {
|
||||
union
|
||||
{
|
||||
gboolean bool;
|
||||
gint integer;
|
||||
gchar *str;
|
||||
gchar **array;
|
||||
} prev;
|
||||
union {
|
||||
union
|
||||
{
|
||||
gchar *str;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
gint len;
|
||||
gchar **data;
|
||||
} array;
|
||||
@ -628,9 +632,10 @@ 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')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user