[vlc-devel] commit: objects: use fputs/fputc if there is nothing to format ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Jan 6 15:08:20 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan  6 16:07:51 2010 +0200| [4dafef962741b5655cc8d54cb80e8d9f722d4881] | committer: Rémi Denis-Courmont 

objects: use fputs/fputc if there is nothing to format

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4dafef962741b5655cc8d54cb80e8d9f722d4881
---

 src/misc/objects.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/misc/objects.c b/src/misc/objects.c
index f7c47ce..1ddda1e 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -797,11 +797,11 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
     printf( " *-o \"%s\" (%s", p_var->psz_name, psz_type );
     if( p_var->psz_text )
         printf( ", %s", p_var->psz_text );
-    printf( ")" );
+    fputc( ')', stdout );
     if( p_var->i_type & VLC_VAR_HASCHOICE )
-        printf( ", has choices" );
+        fputs( ", has choices", stdout );
     if( p_var->i_type & VLC_VAR_ISCOMMAND )
-        printf( ", command" );
+        fputs( ", command", stdout );
     if( p_var->i_entries )
         printf( ", %d callbacks", p_var->i_entries );
     switch( p_var->i_type & VLC_VAR_CLASS )
@@ -828,10 +828,10 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
             printf( ": %p", p_var->val.p_address );
             break;
         case VLC_VAR_LIST:
-            printf( ": TODO" );
+            fputs( ": TODO", stdout );
             break;
     }
-    printf( "\n" );
+    fputc( '\n', stdout );
 }
 
 /*****************************************************************************
@@ -877,7 +877,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
         PrintObject( p_object, "" );
         vlc_mutex_lock( &vlc_internals( p_object )->var_lock );
         if( vlc_internals( p_object )->var_root == NULL )
-            printf( " `-o No variables\n" );
+            puts( " `-o No variables" );
         else
             twalk( vlc_internals( p_object )->var_root, DumpVariable );
         vlc_mutex_unlock( &vlc_internals( p_object )->var_lock );




More information about the vlc-devel mailing list