blue screen: __MIN and __MAX are not expansion-safe
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 19 May 2009 16:53:05 +0000 (19:53 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 19 May 2009 17:59:05 +0000 (20:59 +0300)
modules/video_filter/bluescreen.c

index e2b4442..5af9b20 100644 (file)
@@ -130,9 +130,10 @@ static int Create( vlc_object_t *p_this )
     config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
                        p_filter->p_cfg );
 
+    int val;
 #define GET_VAR( name, min, max )                                           \
-    p_sys->i_##name = __MIN( max, __MAX( min,                               \
-        var_CreateGetIntegerCommand( p_filter, CFG_PREFIX #name ) ) );      \
+    val = var_CreateGetIntegerCommand( p_filter, CFG_PREFIX #name );        \
+    p_sys->i_##name = __MIN( max, __MAX( min, val ) );                      \
     var_AddCallback( p_filter, CFG_PREFIX #name, BluescreenCallback, p_sys );
 
     GET_VAR( u, 0x00, 0xff );