diff options
author | phk <phk@FreeBSD.org> | 2003-04-09 08:56:26 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-04-09 08:56:26 +0000 |
commit | 3faf153e04971a765b1fc2aa0e91b8f1b713e62d (patch) | |
tree | 8e7933843975f9f427e08aefa17e8000a0ed0711 | |
parent | 5f0dd74a54be7f925d739a48223595e57a379cfb (diff) | |
download | FreeBSD-src-3faf153e04971a765b1fc2aa0e91b8f1b713e62d.zip FreeBSD-src-3faf153e04971a765b1fc2aa0e91b8f1b713e62d.tar.gz |
Style issue: use do {...} while(0); for multi-exit section.
-rw-r--r-- | sys/geom/geom_apple.c | 4 | ||||
-rw-r--r-- | sys/geom/geom_mbr.c | 8 | ||||
-rw-r--r-- | sys/geom/geom_pc98.c | 4 | ||||
-rw-r--r-- | sys/geom/geom_sunlabel.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/geom/geom_apple.c b/sys/geom/geom_apple.c index 532141c..745470f 100644 --- a/sys/geom/geom_apple.c +++ b/sys/geom/geom_apple.c @@ -170,7 +170,7 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) g_topology_unlock(); gp->dumpconf = g_apple_dumpconf; npart = 0; - while (1) { /* a trick to allow us to use break */ + do { if (gp->rank != 2 && insist == 0) break; @@ -262,7 +262,7 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) g_topology_unlock(); } break; - } + } while(0); g_topology_lock(); g_access_rel(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c index a044ce5..92ba6a8 100644 --- a/sys/geom/geom_mbr.c +++ b/sys/geom/geom_mbr.c @@ -300,7 +300,7 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist) gsp = gp->softc; g_topology_unlock(); gp->dumpconf = g_mbr_dumpconf; - while (1) { /* a trick to allow us to use break */ + do { if (gp->rank != 2 && insist == 0) break; error = g_getattr("GEOM::fwsectors", cp, &fwsectors); @@ -319,7 +319,7 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist) g_topology_unlock(); g_free(buf); break; - } + } while (0); g_topology_lock(); g_access_rel(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { @@ -407,7 +407,7 @@ g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) gp->dumpconf = g_mbrext_dumpconf; off = 0; slice = 0; - while (1) { /* a trick to allow us to use break */ + do { error = g_getattr("MBR::type", cp, &i); if (error || (i != DOSPTYP_EXT && i != DOSPTYP_EXTLBA)) break; @@ -457,7 +457,7 @@ g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) off = ((off_t)dp[1].dp_start) << 9ULL; } break; - } + } while (0); g_topology_lock(); g_access_rel(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c index 756f053..d9ed6da 100644 --- a/sys/geom/geom_pc98.c +++ b/sys/geom/geom_pc98.c @@ -305,7 +305,7 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags) gsp = gp->softc; g_topology_unlock(); gp->dumpconf = g_pc98_dumpconf; - while (1) { /* a trick to allow us to use break */ + do { if (gp->rank != 2 && flags == G_TF_NORMAL) break; error = g_getattr("GEOM::fwsectors", cp, &fwsectors); @@ -335,7 +335,7 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags) g_topology_unlock(); g_free(buf); break; - } + } while (0); g_topology_lock(); g_access_rel(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c index 78254e6..8becf01 100644 --- a/sys/geom/geom_sunlabel.c +++ b/sys/geom/geom_sunlabel.c @@ -168,7 +168,7 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags) g_topology_unlock(); gp->dumpconf = g_sunlabel_dumpconf; npart = 0; - do { /* a trick to allow us to use break */ + do { if (gp->rank != 2 && flags == G_TF_NORMAL) break; ms->sectorsize = cp->provider->sectorsize; |