Slight if reordering to make error branch last.

This commit is contained in:
Warner Losh 2014-03-07 01:01:57 +00:00
parent e8a3a237fc
commit 4ac70c829c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262880

View file

@ -988,10 +988,10 @@ calculate_geometry(int fd)
/* Get storage erase unit size */
if (!is_nand)
erasesize = NANDFS_DEF_ERASESIZE;
else if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1)
errx(1, "Cannot ioctl(NAND_IO_GET_CHIP_PARAM)");
else
else if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) != -1)
erasesize = chip_params.page_size * chip_params.pages_per_block;
else
errx(1, "Cannot ioctl(NAND_IO_GET_CHIP_PARAM)");
debug("erasesize: %#jx", (uintmax_t)erasesize);