From 5a128153271e991c48223560574f763c3fab3b15 Mon Sep 17 00:00:00 2001 From: Eric van Gyzen Date: Mon, 13 Jan 2020 22:36:29 +0000 Subject: [PATCH] fstyp hammer2: remove dead code best_i will always be >= 0, so remove code to test otherwise. Reported by: Coverity CID: 1412244 MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23159 --- usr.sbin/fstyp/hammer2.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/usr.sbin/fstyp/hammer2.c b/usr.sbin/fstyp/hammer2.c index a5892a148711..b0c1f77057c5 100644 --- a/usr.sbin/fstyp/hammer2.c +++ b/usr.sbin/fstyp/hammer2.c @@ -87,11 +87,6 @@ __read_label(FILE *fp, char *label, size_t size) best = broot; } } - if (best_i == -1) { - warnx("Failed to find volume header from zones"); - error = 1; - goto done; - } bref = &vols[best_i]->voldata.sroot_blockset.blockref[0]; if (bref->type != HAMMER2_BREF_TYPE_INODE) {