Style issue: use do {...} while(0); for multi-exit section.
This commit is contained in:
parent
efddc6c820
commit
2692cc08db
@ -170,7 +170,7 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
|
|||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
gp->dumpconf = g_apple_dumpconf;
|
gp->dumpconf = g_apple_dumpconf;
|
||||||
npart = 0;
|
npart = 0;
|
||||||
while (1) { /* a trick to allow us to use break */
|
do {
|
||||||
if (gp->rank != 2 && insist == 0)
|
if (gp->rank != 2 && insist == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
|
|||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
} while(0);
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_access_rel(cp, -1, 0, 0);
|
g_access_rel(cp, -1, 0, 0);
|
||||||
if (LIST_EMPTY(&gp->provider)) {
|
if (LIST_EMPTY(&gp->provider)) {
|
||||||
|
@ -300,7 +300,7 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
|
|||||||
gsp = gp->softc;
|
gsp = gp->softc;
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
gp->dumpconf = g_mbr_dumpconf;
|
gp->dumpconf = g_mbr_dumpconf;
|
||||||
while (1) { /* a trick to allow us to use break */
|
do {
|
||||||
if (gp->rank != 2 && insist == 0)
|
if (gp->rank != 2 && insist == 0)
|
||||||
break;
|
break;
|
||||||
error = g_getattr("GEOM::fwsectors", cp, &fwsectors);
|
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_topology_unlock();
|
||||||
g_free(buf);
|
g_free(buf);
|
||||||
break;
|
break;
|
||||||
}
|
} while (0);
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_access_rel(cp, -1, 0, 0);
|
g_access_rel(cp, -1, 0, 0);
|
||||||
if (LIST_EMPTY(&gp->provider)) {
|
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;
|
gp->dumpconf = g_mbrext_dumpconf;
|
||||||
off = 0;
|
off = 0;
|
||||||
slice = 0;
|
slice = 0;
|
||||||
while (1) { /* a trick to allow us to use break */
|
do {
|
||||||
error = g_getattr("MBR::type", cp, &i);
|
error = g_getattr("MBR::type", cp, &i);
|
||||||
if (error || (i != DOSPTYP_EXT && i != DOSPTYP_EXTLBA))
|
if (error || (i != DOSPTYP_EXT && i != DOSPTYP_EXTLBA))
|
||||||
break;
|
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;
|
off = ((off_t)dp[1].dp_start) << 9ULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
} while (0);
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_access_rel(cp, -1, 0, 0);
|
g_access_rel(cp, -1, 0, 0);
|
||||||
if (LIST_EMPTY(&gp->provider)) {
|
if (LIST_EMPTY(&gp->provider)) {
|
||||||
|
@ -305,7 +305,7 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags)
|
|||||||
gsp = gp->softc;
|
gsp = gp->softc;
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
gp->dumpconf = g_pc98_dumpconf;
|
gp->dumpconf = g_pc98_dumpconf;
|
||||||
while (1) { /* a trick to allow us to use break */
|
do {
|
||||||
if (gp->rank != 2 && flags == G_TF_NORMAL)
|
if (gp->rank != 2 && flags == G_TF_NORMAL)
|
||||||
break;
|
break;
|
||||||
error = g_getattr("GEOM::fwsectors", cp, &fwsectors);
|
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_topology_unlock();
|
||||||
g_free(buf);
|
g_free(buf);
|
||||||
break;
|
break;
|
||||||
}
|
} while (0);
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_access_rel(cp, -1, 0, 0);
|
g_access_rel(cp, -1, 0, 0);
|
||||||
if (LIST_EMPTY(&gp->provider)) {
|
if (LIST_EMPTY(&gp->provider)) {
|
||||||
|
@ -168,7 +168,7 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
|
|||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
gp->dumpconf = g_sunlabel_dumpconf;
|
gp->dumpconf = g_sunlabel_dumpconf;
|
||||||
npart = 0;
|
npart = 0;
|
||||||
do { /* a trick to allow us to use break */
|
do {
|
||||||
if (gp->rank != 2 && flags == G_TF_NORMAL)
|
if (gp->rank != 2 && flags == G_TF_NORMAL)
|
||||||
break;
|
break;
|
||||||
ms->sectorsize = cp->provider->sectorsize;
|
ms->sectorsize = cp->provider->sectorsize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user