[vlc-devel] commit: Fix format string non-sense ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Aug 13 20:50:17 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Aug 13 21:51:53 2008 +0300| [1375539f9df669d88c7b648be3e9a40e104c0f78] | committer: Rémi Denis-Courmont
Fix format string non-sense
(I wonder how we can have so stupid code)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1375539f9df669d88c7b648be3e9a40e104c0f78
---
src/video_output/vout_intf.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 77b94e6..c0602d0 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -609,16 +609,9 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
}
if( p_mypicturesdir == NULL )
- {
- if( asprintf( &val.psz_string, "%s", config_GetHomeDir() ) == -1 )
- val.psz_string = NULL;
- }
+ val.psz_string = strdup( config_GetHomeDir() );
else
- {
- if( asprintf( &val.psz_string, p_mypicturesdir ) == -1 )
- val.psz_string = NULL;
- free( p_mypicturesdir );
- }
+ val.psz_string = p_mypicturesdir;
}
#else
More information about the vlc-devel
mailing list