]> git.sesse.net Git - vlc/commitdiff
Do not embed \0 in format string - fix warning
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 5 Jul 2009 17:20:17 +0000 (20:20 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 5 Jul 2009 17:20:17 +0000 (20:20 +0300)
Parsing of a format string will anyway stop at the first nul, so there
is no point in having two nuls.

modules/access/bda/bda.c

index 7827893a40a2333e09ba2935357ee7875c626723..3261bfa297bf6e093070f866fc054d50348b9b6f 100644 (file)
@@ -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 );