HomeFreeBSD

Fix coverity defects: CID 155928

Description

Fix coverity defects: CID 155928

CID 155928: Integer handling issues (DIVIDE_BY_ZERO)

In the current vdev label, the leaf count is always non-zero
but it doesn't hurt to check the count for future proofing.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@intel.com>
Closes #5749

Details

Provenance
Don Brady <don.brady@intel.com>Authored on Feb 7 2017, 5:29 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 7 2017, 5:29 PM
Parents
rG582cc0141699: Fix ZFS Test Suite failures caused by ksh brace expansion feature
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGcd5083c00c62: Fix coverity defects: CID 155928 (authored by Don Brady <don.brady@intel.com>).Feb 7 2017, 5:29 PM