Some of the files in libparted/fs/ext2 has some lines where *printf
style functions can be replaced by fput* style ones.

I have attached a 'diff -uNp' against
libparted/fs/ext2/libparted/fs/ext2/ext2_block_relocator.c There are a
few more files too.

By the way I encountered TABed indentations in
libparted/fs/ext2/libparted/fs/ext2/ext2_block_relocator.c. Can I
replace them with blankspaces?

Happy hacking,
Debarshi
--
GPG key ID: 63D4A5A7
Key server: pgp.mit.edu
--- libparted/fs/ext2/ext2_block_relocator.c	2007-01-14 20:11:51.000000000 +0530
+++ ../ext2_block_relocator.c	2007-03-06 04:25:19.000000000 +0530
@@ -429,7 +429,7 @@ static int doscan(struct ext2_fs *fs, st
 	}
 
 	if (fs->opt_verbose)
-		fprintf(stderr, "\n");
+                fputc('\n', stderr);
 
 	state->start[3].dst = state->block;
 	state->start[2].dst = state->start[3].dst + state->start[3].num;
@@ -499,7 +499,7 @@ static int ext2_block_relocator_copy(str
 			ext2_sync(fs);
 
 		if (fs->opt_verbose)
-			fprintf(stderr, "\n");
+                        fputc('\n', stderr);
 	}
 	else
 	{
@@ -558,7 +558,7 @@ static int ext2_block_relocator_ref(stru
 			if (numerrors++ < 4)
 				return 1;
 
-			fprintf(stderr, "all is not well!\n");
+			fputs("all is not well!\n", stderr);
 			return 0;
 		}
 	}
@@ -642,7 +642,7 @@ static int ext2_block_relocator_flush(st
 		return 1;
 
 	if (fs->opt_verbose)
-		fprintf(stderr, "ext2_block_relocator_flush\n");
+                fputs("ext2_block_relocator_flush\n", stderr);
 
 	if (fs->opt_debug)
 	{
@@ -651,9 +651,8 @@ static int ext2_block_relocator_flush(st
 		for (i=0; (unsigned int) i < state->usedentries-1; i++)
 			if (state->block[i].num >= state->block[i+1].num)
 			{
-				fprintf(stderr,
-					"ext2_block_relocator_flush: "
-					"blocks not in order!\n");
+				fputs("ext2_block_relocator_flush: "
+				      "blocks not in order!\n", stderr);
 
 				qsort(state->block,
 				      state->usedentries,
@@ -715,7 +714,7 @@ static int ext2_block_relocator_flush(st
 		}
 
 		if (fs->opt_verbose)
-			fprintf(stderr, "\n");
+		        fputc('\n', stderr);
 	}
 
 	state->usedentries = 0;
@@ -907,7 +906,7 @@ int ext2_block_relocate(struct ext2_fs *
 	struct ext2_block_relocator_state state;
 
 	if (fs->opt_verbose)
-		fprintf(stderr, "relocating blocks....\n");
+                fputs("relocating blocks....\n", stderr);
 
 	state.newallocoffset = 0;
 	state.allocentries = (ext2_relocator_pool_size << 10) /
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to