mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +01:00
Check the return value of g_get_prgname for NULL before passing to strcmp.
2006-04-05 Behdad Esfahbod <behdad@gnome.org> * tests/option-test.c: Check the return value of g_get_prgname for NULL before passing to strcmp. * tests/slice-test.c: Report the correct name in Usage summary.
This commit is contained in:
parent
5525aa52c9
commit
8741c8bf5a
@ -1,3 +1,10 @@
|
|||||||
|
2006-04-05 Behdad Esfahbod <behdad@gnome.org>
|
||||||
|
|
||||||
|
* tests/option-test.c: Check the return value of g_get_prgname for
|
||||||
|
NULL before passing to strcmp.
|
||||||
|
|
||||||
|
* tests/slice-test.c: Report the correct name in Usage summary.
|
||||||
|
|
||||||
2006-04-05 Matthias Clasen <mclasen@redhat.com>
|
2006-04-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* tests/run-collate-tests.sh: Fix up shell script.
|
* tests/run-collate-tests.sh: Fix up shell script.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2006-04-05 Behdad Esfahbod <behdad@gnome.org>
|
||||||
|
|
||||||
|
* tests/option-test.c: Check the return value of g_get_prgname for
|
||||||
|
NULL before passing to strcmp.
|
||||||
|
|
||||||
|
* tests/slice-test.c: Report the correct name in Usage summary.
|
||||||
|
|
||||||
2006-04-05 Matthias Clasen <mclasen@redhat.com>
|
2006-04-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* tests/run-collate-tests.sh: Fix up shell script.
|
* tests/run-collate-tests.sh: Fix up shell script.
|
||||||
|
@ -916,6 +916,7 @@ empty_test1 (void)
|
|||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
GOptionEntry entries [] =
|
GOptionEntry entries [] =
|
||||||
{ { NULL } };
|
{ { NULL } };
|
||||||
|
char *prgname;
|
||||||
|
|
||||||
g_set_prgname (NULL);
|
g_set_prgname (NULL);
|
||||||
context = g_option_context_new (NULL);
|
context = g_option_context_new (NULL);
|
||||||
@ -924,7 +925,8 @@ empty_test1 (void)
|
|||||||
|
|
||||||
g_option_context_parse (context, NULL, NULL, NULL);
|
g_option_context_parse (context, NULL, NULL, NULL);
|
||||||
|
|
||||||
g_assert (strcmp (g_get_prgname (), "<unknown>") == 0);
|
prgname = g_get_prgname ();
|
||||||
|
g_assert (prgname && strcmp (prgname, "<unknown>") == 0);
|
||||||
|
|
||||||
g_option_context_free (context);
|
g_option_context_free (context);
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ test_sliced_mem_thread (gpointer data)
|
|||||||
static void
|
static void
|
||||||
usage (void)
|
usage (void)
|
||||||
{
|
{
|
||||||
g_print ("Usage: gslicedmemory [n_threads] [G|S|M|O][f][c] [maxblocksize] [seed]\n");
|
g_print ("Usage: slice-test [n_threads] [G|S|M|O][f][c] [maxblocksize] [seed]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user