From 33a843a7245ab6a5ddba7325f3db55ec5bd727cc Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 18 Dec 2002 07:25:33 +0000 Subject: Untwist a twisty bit of logic which gcc for some reason cannot see through on ia64. --- sbin/gbde/gbde.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/gbde/gbde.c b/sbin/gbde/gbde.c index 415d1c1..e3e278e 100644 --- a/sbin/gbde/gbde.c +++ b/sbin/gbde/gbde.c @@ -486,14 +486,14 @@ cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char /* */ p = property_find(params, "sector_size"); i = ioctl(dfd, DIOCGSECTORSIZE, &u); - if (i == 0) - sector_size = u; - else if (p == NULL) - errx(1, "Missing sector_size property"); if (p != NULL) { sector_size = strtoul(p, &q, 0); if (!*p || *q) errx(1, "sector_size not a proper number"); + } else if (i == 0) { + sector_size = u; + } else { + errx(1, "Missing sector_size property"); } if (sector_size & (sector_size - 1)) errx(1, "sector_size not a power of 2"); -- cgit v1.1