stats: fix initialization on 32bits builds
authorRafaël Carré <rafael.carre@gmail.com>
Tue, 2 Nov 2010 06:15:00 +0000 (07:15 +0100)
committerRafaël Carré <rafael.carre@gmail.com>
Tue, 2 Nov 2010 06:15:00 +0000 (07:15 +0100)
using psz_string to initialize will leave the top 32bits uninitialized

src/misc/stats.c

index 7a46306..77e1235 100644 (file)
@@ -452,7 +452,7 @@ static int CounterUpdate( vlc_object_t *p_handler,
         {
             counter_sample_t *p_new = (counter_sample_t*)malloc(
                                                sizeof( counter_sample_t ) );
-            p_new->value.psz_string = NULL;
+            p_new->value.i_int = 0;
 
             INSERT_ELEM( p_counter->pp_samples, p_counter->i_samples,
                          p_counter->i_samples, p_new );
@@ -524,7 +524,7 @@ static int CounterUpdate( vlc_object_t *p_handler,
         {
             counter_sample_t *p_new = (counter_sample_t*)malloc(
                                                sizeof( counter_sample_t ) );
-            p_new->value.psz_string = NULL;
+            p_new->value.i_int = 0;
 
             INSERT_ELEM( p_counter->pp_samples, p_counter->i_samples,
                          p_counter->i_samples, p_new );