[parted-devel] avoid printf, when easy to do

Otavio Salvador otavio at debian.org
Wed Mar 7 20:54:41 CET 2007


"Debarshi 'Rishi' Ray" <debarshi.ray at gmail.com> writes:

> Some more printf-like functions replaced by fputs, puts and putchar. I
> have tried to avoid any re-formatting than what was absolutely
> necessary to preserve the formatting of the code after making the
> changes.
>
> Comments?

Some comments.

> --- a/libparted/fs/ext2/ext2_inode_relocator.c
> +++ b/libparted/fs/ext2/ext2_inode_relocator.c
> @@ -309,7 +309,7 @@ static int doscan(struct ext2_fs *fs, struct ext2_inode_relocator_state *state)
>  		}
>  
>  	if (fs->opt_verbose)
> -		fprintf(stderr, "\n");
> +                fputc ('\n', stderr);

I don't know if we should or not also change the indentation on the
changed lines. I'm ok with it but I would like to hear from the others
too.

There're a lot of indentation changes on the patch.

> --- a/libparted/fs/ext2/ext2_resize.c
> +++ b/libparted/fs/ext2/ext2_resize.c
> @@ -18,7 +18,7 @@
> */
> 
>  #include <config.h>
> -
> +v
>  #ifndef DISCOVER_ONLY
>  
>  #include <stdio.h>

I bet it won't compile ;-)

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



More information about the parted-devel mailing list