mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 04:02:09 +01:00
goption: Use new g_newa0() function
Replace old `g_newa()` and `memset()` with `g_newa0()`
This commit is contained in:
parent
34cf69ef17
commit
b321bf70d7
@ -2113,8 +2113,7 @@ g_option_context_parse (GOptionContext *context,
|
|||||||
gboolean has_h_entry = context_has_h_entry (context);
|
gboolean has_h_entry = context_has_h_entry (context);
|
||||||
arg = (*argv)[i] + 1;
|
arg = (*argv)[i] + 1;
|
||||||
arg_length = strlen (arg);
|
arg_length = strlen (arg);
|
||||||
nulled_out = g_newa (gboolean, arg_length);
|
nulled_out = g_newa0 (gboolean, arg_length);
|
||||||
memset (nulled_out, 0, arg_length * sizeof (gboolean));
|
|
||||||
for (j = 0; j < arg_length; j++)
|
for (j = 0; j < arg_length; j++)
|
||||||
{
|
{
|
||||||
if (context->help_enabled && (arg[j] == '?' ||
|
if (context->help_enabled && (arg[j] == '?' ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user