Commit a6e1074b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

keys: remove zero-length array

parent a5a33334
......@@ -396,7 +396,7 @@ struct vlc_actions
{
void *map; /* Key map */
void *global_map; /* Grabbed/global key map */
struct hotkey keys[0];
struct hotkey keys[1];
};
static int vlc_key_to_action (vlc_object_t *obj, const char *varname,
......@@ -474,7 +474,7 @@ struct vlc_actions *vlc_InitActions (libvlc_int_t *libvlc)
{
vlc_object_t *obj = VLC_OBJECT(libvlc);
struct hotkey *keys;
struct vlc_actions *as = malloc (sizeof (*as) + (ACTIONS_COUNT + 1) * sizeof (*keys));
struct vlc_actions *as = malloc (sizeof (*as) + ACTIONS_COUNT * sizeof (*keys));
if (unlikely(as == NULL))
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment