[vlc-devel] commit: Don't use random number as pointers. ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Feb 14 10:58:26 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 14 11:55:50 2010 +0200| [1341c12935d18fd56b886969ecf1565f5b2ace96] | committer: Rémi Denis-Courmont
Don't use random number as pointers.
This is not legal (even if it works on all platforms). Also, this fixes
a warning.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1341c12935d18fd56b886969ecf1565f5b2ace96
---
test/src/misc/variables.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/test/src/misc/variables.c b/test/src/misc/variables.c
index e252461..15e7fc5 100644
--- a/test/src/misc/variables.c
+++ b/test/src/misc/variables.c
@@ -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 );
}
More information about the vlc-devel
mailing list