svn commit: r356709 - head/usr.sbin/fstyp

Eric van Gyzen vangyzen at FreeBSD.org
Mon Jan 13 22:36:30 UTC 2020


Author: vangyzen
Date: Mon Jan 13 22:36:29 2020
New Revision: 356709
URL: https://svnweb.freebsd.org/changeset/base/356709

Log:
  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

Modified:
  head/usr.sbin/fstyp/hammer2.c

Modified: head/usr.sbin/fstyp/hammer2.c
==============================================================================
--- head/usr.sbin/fstyp/hammer2.c	Mon Jan 13 22:33:48 2020	(r356708)
+++ head/usr.sbin/fstyp/hammer2.c	Mon Jan 13 22:36:29 2020	(r356709)
@@ -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) {


More information about the svn-src-all mailing list