From: Theodore Ts'o Date: Thu, 21 Jan 2021 21:51:45 +0000 (-0500) Subject: e2fsck: remove dead code when recreating the journal X-Git-Tag: v1.46.0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f84fed462a64fa680a8c89d1e248564dda981bf4;p=thirdparty%2Fe2fsprogs.git e2fsck: remove dead code when recreating the journal params.num_journal_blocks is an unsigned value so it can never be less than zero. Addresses-Coverity-Bug: 1472250 Signed-off-by: Theodore Ts'o --- diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 2d2a3049d..84224c14f 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -1924,13 +1924,6 @@ print_unsupp_features: jparams.num_journal_blocks = journal_size; jparams.num_fc_blocks = 0; } - if (jparams.num_journal_blocks < 0) { - ext2fs_clear_feature_journal(fs->super); - fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY; - log_out(ctx, "%s: Couldn't determine " - "journal size\n", ctx->program_name); - goto no_journal; - } log_out(ctx, _("Creating journal (%d blocks): "), jparams.num_journal_blocks); fflush(stdout);