mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 15:46:17 +01:00
Don't leave out parameters uninitialized. (#490061, Benjamin Otte)
2007-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_parse_long_long): Don't leave out parameters uninitialized. (#490061, Benjamin Otte) svn path=/trunk/; revision=5819
This commit is contained in:
parent
1c93d867fc
commit
263a48aaec
@ -1,3 +1,8 @@
|
||||
2007-11-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gstrfuncs.c (g_parse_long_long): Don't leave
|
||||
out parameters uninitialized. (#490061, Benjamin Otte)
|
||||
|
||||
2007-11-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gmain.c (g_main_context_unref): Don't leak the
|
||||
|
@ -650,9 +650,12 @@ g_parse_long_long (const gchar *nptr,
|
||||
|
||||
g_return_val_if_fail (nptr != NULL, 0);
|
||||
|
||||
*negative = FALSE;
|
||||
if (base == 1 || base > 36)
|
||||
{
|
||||
errno = EINVAL;
|
||||
if (endptr)
|
||||
*endptr = nptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -666,7 +669,6 @@ g_parse_long_long (const gchar *nptr,
|
||||
goto noconv;
|
||||
|
||||
/* Check for a sign. */
|
||||
*negative = FALSE;
|
||||
if (*s == '-')
|
||||
{
|
||||
*negative = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user