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:
Matthias Clasen 2007-11-08 05:24:29 +00:00 committed by Matthias Clasen
parent 1c93d867fc
commit 263a48aaec
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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;