[vlc-devel] commit: Do not re-invent strcpy ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon May 5 22:40:08 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Mon May  5 23:14:19 2008 +0300| [3441c108d129086918f6625c56939192794f76fa]

Do not re-invent strcpy

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

 src/playlist/loadsave.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index 1579db3..77749c4 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -196,9 +196,8 @@ int playlist_MLDump( playlist_t *p_playlist )
         return VLC_EGENERIC;
     }
 
-    char psz_dirname[ strlen( psz_datadir )
-                      + sizeof( DIR_SEP "ml.xspf")];
-    sprintf( psz_dirname, "%s", psz_datadir );
+    char psz_dirname[ strlen( psz_datadir ) + sizeof( DIR_SEP "ml.xspf")];
+    strcpy( psz_dirname, psz_datadir );
     if( config_CreateDir( (vlc_object_t *)p_playlist, psz_dirname ) )
     {
         return VLC_EGENERIC;




More information about the vlc-devel mailing list