[vlc-devel] commit: Do not embed \0 in format string - fix warning ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Jul 5 19:34:25 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 5 20:20:17 2009 +0300| [f3aaa6e2c2684de96f25b57e417b0aaed09bb35f] | committer: Rémi Denis-Courmont
Do not embed \0 in format string - fix warning
Parsing of a format string will anyway stop at the first nul, so there
is no point in having two nuls.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3aaa6e2c2684de96f25b57e417b0aaed09bb35f
---
modules/access/bda/bda.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/access/bda/bda.c b/modules/access/bda/bda.c
index 7827893..3261bfa 100644
--- a/modules/access/bda/bda.c
+++ b/modules/access/bda/bda.c
@@ -363,7 +363,7 @@ static int Open( vlc_object_t *p_this )
for( int i = 0; i < i_param_count; i++ )
{
- snprintf( psz_full_name, 128, "%s-%s\0", psz_module,
+ snprintf( psz_full_name, 128, "%s-%s", psz_module,
psz_param[i] );
var_Create( p_access, psz_full_name, i_type[i] | VLC_VAR_DOINHERIT );
}
@@ -509,7 +509,7 @@ static int ParsePath( access_t *p_access, const char* psz_module,
v_value.psz_string = strdup( psz_value );
if( i_type[i_this_param] == VLC_VAR_INTEGER )
v_value.i_int = atol( psz_value );
- snprintf( psz_full_name, 128, "%s-%s\0", psz_module,
+ snprintf( psz_full_name, 128, "%s-%s", psz_module,
psz_param[i_this_param] );
var_Set( p_access, psz_full_name, v_value );
More information about the vlc-devel
mailing list