summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/geom_apple.c4
-rw-r--r--sys/geom/geom_mbr.c8
-rw-r--r--sys/geom/geom_pc98.c4
-rw-r--r--sys/geom/geom_sunlabel.c2
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;
OpenPOWER on IntegriCloud