diff options
author | billf <billf@FreeBSD.org> | 1999-07-21 01:55:03 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-07-21 01:55:03 +0000 |
commit | c4577d552a099afe0c8b21aeeb54b9d13f06bb03 (patch) | |
tree | 8e763da83207f18a8541cd3335b310ea24d05791 /sbin/newfs_msdos/newfs_msdos.c | |
parent | 95fd90d5ae9179fada00842b10016f0509ec1780 (diff) | |
download | FreeBSD-src-c4577d552a099afe0c8b21aeeb54b9d13f06bb03.zip FreeBSD-src-c4577d552a099afe0c8b21aeeb54b9d13f06bb03.tar.gz |
Avoid ambigious if-else
Diffstat (limited to 'sbin/newfs_msdos/newfs_msdos.c')
-rw-r--r-- | sbin/newfs_msdos/newfs_msdos.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index dbcb4d1..3d16b9a 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -27,7 +27,7 @@ #ifndef lint static const char rcsid[] = - "$Id: newfs_msdos.c,v 1.6 1998/12/07 14:09:17 rnordier Exp $"; + "$Id: newfs_msdos.c,v 1.7 1999/01/03 02:18:57 jkh Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -373,11 +373,12 @@ main(int argc, char *argv[]) if (bpb.bps < MINBPS) errx(1, "bytes/sector (%u) is too small; minimum is %u", bpb.bps, MINBPS); - if (!(fat = opt_F)) + if (!(fat = opt_F)) { if (opt_f) fat = 12; else if (!opt_e && (opt_i || opt_k)) fat = 32; + } if ((fat == 32 && opt_e) || (fat != 32 && (opt_i || opt_k))) errx(1, "-%c is not a legal FAT%s option", fat == 32 ? 'e' : opt_i ? 'i' : 'k', @@ -440,7 +441,7 @@ main(int argc, char *argv[]) } if (!bpb.nft) bpb.nft = 2; - if (!fat) + if (!fat) { if (bpb.bsec < (bpb.res ? bpb.res : bss) + howmany((RESFTE + (bpb.spc ? MINCLS16 : MAXCLS12 + 1)) * ((bpb.spc ? 16 : 12) / BPN), bpb.bps * NPB) * @@ -459,6 +460,7 @@ main(int argc, char *argv[]) fat = 16; else fat = 32; + } x = bss; if (fat == 32) { if (!bpb.infs) { @@ -765,13 +767,14 @@ getdiskinfo(int fd, const char *fname, const char *dtype, int oflag, free(s); errno = e; } - if (i == -1) + if (i == -1) { if (!dtype) { warn("ioctl (GDINFO)"); errx(1, "%s: can't read disk label; " "disk type must be specified", fname); } else if (!(lp = getdiskbyname(dtype))) errx(1, "%s: unknown disk type", dtype); + } if (slice == -1 || part != -1) { if (part == -1) part = RAW_PART; |