]> git.sesse.net Git - vlc/blobdiff - test/src/misc/variables.c
Don't use random number as pointers.
[vlc] / test / src / misc / variables.c
index e2524618da8642d59428dd4071a3043f321092d6..15e7fc5d0df865ecee61f43b1601b1ec3ad618e1 100644 (file)
@@ -154,13 +154,15 @@ static void test_strings( libvlc_int_t *p_libvlc )
 
 static void test_address( libvlc_int_t *p_libvlc )
 {
+    char dummy[i_var_count];
+
     int i;
     for( i = 0; i < i_var_count; i++ )
          var_Create( p_libvlc, psz_var_name[i], VLC_VAR_ADDRESS );
 
     for( i = 0; i < i_var_count; i++ )
     {
-        var_value[i].p_address = rand();
+        var_value[i].p_address = dummy + i;
         var_SetAddress( p_libvlc, psz_var_name[i], var_value[i].p_address );
     }