[vlc-devel] commit: darwin_specific: cleanup (Jean-Paul Saman )
git version control
git at videolan.org
Mon Jun 15 14:47:32 CEST 2009
vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Sun Jun 14 00:20:53 2009 +0200| [a27e683aff0ebf1c076f014a319f66eb227217ac] | committer: Derk-Jan Hartman
darwin_specific: cleanup
(cherry picked from commit 2cf6ffb217f25e64cb87730226f1722ce187f15f)
Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a27e683aff0ebf1c076f014a319f66eb227217ac
---
src/misc/darwin_specific.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/misc/darwin_specific.c b/src/misc/darwin_specific.c
index b33b3bb..d11cede 100644
--- a/src/misc/darwin_specific.c
+++ b/src/misc/darwin_specific.c
@@ -50,14 +50,13 @@
void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
{
VLC_UNUSED(p_this);
- char i_dummy;
+ char i_dummy = '\0';
char *p_char = NULL;
char *p_oldchar = &i_dummy;
unsigned int i;
(void)pi_argc;
/* Get the full program path and name */
-
/* First try to see if we are linked to the framework */
for (i = 0; i < _dyld_image_count(); i++)
{
@@ -96,6 +95,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
p_char = strdup( ppsz_argv[ 0 ] );
}
+ free(psz_vlcpath);
psz_vlcpath = p_char;
/* Remove trailing program name */
@@ -107,12 +107,11 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
*p_char = '\0';
p_oldchar = p_char;
}
-
p_char++;
}
/* Check if $LANG is set. */
- if ( (p_char = getenv("LANG")) == NULL )
+ if( NULL == getenv("LANG") )
{
/*
Retrieve the preferred language as chosen in System Preferences.app
More information about the vlc-devel
mailing list