[vlc-commits] commit: stats: fix initialization on 32bits builds ( Rafaël Carré )

git at videolan.org git at videolan.org
Tue Nov 2 07:16:03 CET 2010


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Tue Nov  2 07:15:00 2010 +0100| [03c9cf61730535306dfb6d6b6b8ec473c8c7adb0] | committer: Rafaël Carré 

stats: fix initialization on 32bits builds

using psz_string to initialize will leave the top 32bits uninitialized

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

 src/misc/stats.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/misc/stats.c b/src/misc/stats.c
index 7a46306..77e1235 100644
--- a/src/misc/stats.c
+++ b/src/misc/stats.c
@@ -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 );



More information about the vlc-commits mailing list