vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat May 23 
11:08:13 2015 +0300| [9e815e5b0e8b3417ac56cdc8c60f9233a564493a] | committer: 
Rémi Denis-Courmont

input: no need to memset a whole string buffer

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

 src/input/var.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/input/var.c b/src/input/var.c
index 6aaa3f7..8e2ddc4 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -292,13 +292,15 @@ void input_ControlVarNavigation( input_thread_t *p_input )
         var_AddCallback( p_input, val.psz_string,
                          NavigationCallback, (void *)(intptr_t)i );
 
-        char psz_length[MSTRTIME_MAX_SIZE + sizeof(" []")] = "";
+        char psz_length[MSTRTIME_MAX_SIZE + sizeof(" []")];
         if( p_input->p->title[i]->i_length > 0 )
         {
             strcpy( psz_length, " [" );
             secstotimestr( &psz_length[2], p_input->p->title[i]->i_length / 
CLOCK_FREQ );
             strcat( psz_length, "]" );
         }
+        else
+            psz_length[0] = '\0';
 
         if( p_input->p->title[i]->psz_name == NULL ||
             *p_input->p->title[i]->psz_name == '\0' )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to