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

V4L2: fix kinda constant expression to be really constant

parent cc5fb824
......@@ -916,10 +916,12 @@ static int InitVideo( vlc_object_t *p_obj, int i_fd, demux_sys_t *p_sys,
{
const size_t n = sizeof(standards_vlc) / sizeof(*standards_vlc);
static_assert(n == sizeof (standards_v4l2)
/ sizeof (*standards_v4l2), "Inconsistent standards tables");
static_assert(n == sizeof (standards_user)
/ sizeof (*standards_user), "Inconsistent standards tables");
static_assert(sizeof(standards_vlc) / sizeof(*standards_vlc)
== sizeof (standards_v4l2) / sizeof (*standards_v4l2),
"Inconsistent standards tables");
static_assert(sizeof(standards_vlc) / sizeof(*standards_vlc)
== sizeof (standards_user) / sizeof (*standards_user),
"Inconsistent standards tables");
for( size_t i = 0; i < n; i++ )
if( strcasecmp( stdname, standards_vlc[i] ) == 0 )
......
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