From 9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Nov 2013 16:43:33 +0100 Subject: fix assorted unused code and wrong format specs found by cppchekc (bug 6716) Signed-off-by: Denys Vlasenko --- e2fsprogs/old_e2fsprogs/mke2fs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'e2fsprogs/old_e2fsprogs/mke2fs.c') diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c index 35d717a..e44d986 100644 --- a/e2fsprogs/old_e2fsprogs/mke2fs.c +++ b/e2fsprogs/old_e2fsprogs/mke2fs.c @@ -385,7 +385,7 @@ static errcode_t zero_blocks(ext2_filsys fs, blk_t blk, int num, struct progress_struct *progress, blk_t *ret_blk, int *ret_count) { - int j, count, next_update, next_update_incr; + int j, count, next_update; static char *buf; errcode_t retval; @@ -403,9 +403,7 @@ static errcode_t zero_blocks(ext2_filsys fs, blk_t blk, int num, } /* OK, do the write loop */ next_update = 0; - next_update_incr = num / 100; - if (next_update_incr < 1) - next_update_incr = 1; + for (j=0; j < num; j += STRIDE_LENGTH, blk += STRIDE_LENGTH) { count = num - j; if (count > STRIDE_LENGTH) -- cgit v1.1