Commit 9778fc2f authored by Eric Petit's avatar Eric Petit
Browse files

* src/misc/messages.c: forget a defined(SYS_BEOS) in my last commit

 * src/misc/configuration.c: config_PutPsz now sets the variable to NULL
   if the string is empty
 * modules/gui/macosx/prefs.m: remove duplicate (now) code with config_PutPsz
parent a4fc3454
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc * prefs.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.18 2003/05/09 00:41:11 hartman Exp $ * $Id: prefs.m,v 1.19 2003/05/09 00:58:24 titer Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
...@@ -771,8 +771,7 @@ ...@@ -771,8 +771,7 @@
o_value = [o_vlc_control stringValue]; o_value = [o_vlc_control stringValue];
psz_value = (char *)[o_value lossyCString]; psz_value = (char *)[o_value lossyCString];
config_PutPsz( p_intf, psz_name, config_PutPsz( p_intf, psz_name, psz_value );
*psz_value ? psz_value : NULL );
} }
break; break;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* configuration.c management of the modules configuration * configuration.c management of the modules configuration
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: configuration.c,v 1.54 2003/04/07 11:48:51 gbazin Exp $ * $Id: configuration.c,v 1.55 2003/05/09 00:58:25 titer Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -187,7 +187,7 @@ void __config_PutPsz( vlc_object_t *p_this, ...@@ -187,7 +187,7 @@ void __config_PutPsz( vlc_object_t *p_this,
/* free old string */ /* free old string */
if( p_config->psz_value ) free( p_config->psz_value ); if( p_config->psz_value ) free( p_config->psz_value );
if( psz_value ) p_config->psz_value = strdup( psz_value ); if( psz_value && *psz_value ) p_config->psz_value = strdup( psz_value );
else p_config->psz_value = NULL; else p_config->psz_value = NULL;
vlc_mutex_unlock( p_config->p_lock ); vlc_mutex_unlock( p_config->p_lock );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* modules, especially intf modules. See config.h for output configuration. * modules, especially intf modules. See config.h for output configuration.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: messages.c,v 1.31 2003/05/08 19:06:47 titer Exp $ * $Id: messages.c,v 1.32 2003/05/09 00:58:25 titer Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -277,7 +277,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module, ...@@ -277,7 +277,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
return; return;
} }
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) #if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
vsnprintf( psz_str, i_size, psz_format, args ); vsnprintf( psz_str, i_size, psz_format, args );
psz_str[ i_size - 1 ] = 0; /* Just in case */ psz_str[ i_size - 1 ] = 0; /* Just in case */
#endif #endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment