[vlc-commits] V4L2: fix kinda constant expression to be really constant

Rémi Denis-Courmont git at videolan.org
Tue Jan 31 19:20:15 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 31 20:19:57 2012 +0200| [4a647cf16c5f4ef070b2d3c09bd832deb6f7dcec] | committer: Rémi Denis-Courmont

V4L2: fix kinda constant expression to be really constant

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a647cf16c5f4ef070b2d3c09bd832deb6f7dcec
---

 modules/access/v4l2/video.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index 3314470..21d53c1 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -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 )



More information about the vlc-commits mailing list