diff options
author | Brian Behlendorf <[email protected]> | 2008-12-19 11:05:48 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2008-12-19 11:05:48 -0800 |
commit | 893a49fa9a042ffc9c53e8154b67fb145e537421 (patch) | |
tree | 56888f2537a7eebae0d2d86d7a36d1b268283e3b /cmd | |
parent | d9b08ad01fda4aa23637ef87527c9fc49e31a0ae (diff) | |
parent | 9041f66bad2ea642339e71f50d63445f07474c7b (diff) |
Merge branch 'gcc-c90' into refs/top-bases/gcc-branch
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zdb/zdb.c | 14 | ||||
-rw-r--r-- | cmd/ztest/ztest.c | 3 |
2 files changed, 11 insertions, 6 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 253a1346a..ee2923e2c 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -1389,10 +1389,11 @@ static void zdb_leak_init(spa_t *spa) { vdev_t *rvd = spa->spa_root_vdev; + int c, m; - for (int c = 0; c < rvd->vdev_children; c++) { + for (c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; - for (int m = 0; m < vd->vdev_ms_count; m++) { + for (m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); VERIFY(space_map_load(&msp->ms_map, &zdb_space_map_ops, @@ -1407,10 +1408,11 @@ static void zdb_leak_fini(spa_t *spa) { vdev_t *rvd = spa->spa_root_vdev; + int c, m; - for (int c = 0; c < rvd->vdev_children; c++) { + for (c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; - for (int m = 0; m < vd->vdev_ms_count; m++) { + for (m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); space_map_unload(&msp->ms_map); @@ -1445,7 +1447,9 @@ typedef struct zdb_cb { static void zdb_count_block(spa_t *spa, zdb_cb_t *zcb, blkptr_t *bp, dmu_object_type_t type) { - for (int i = 0; i < 4; i++) { + int i; + + for (i = 0; i < 4; i++) { int l = (i < 2) ? BP_GET_LEVEL(bp) : ZB_TOTAL; int t = (i & 1) ? type : DMU_OT_TOTAL; zdb_blkstats_t *zb = &zcb->zcb_type[l][t]; diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 53cc6c709..9274885b2 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -834,11 +834,12 @@ static vdev_t * vdev_lookup_by_path(vdev_t *vd, const char *path) { vdev_t *mvd; + int c; if (vd->vdev_path != NULL && strcmp(path, vd->vdev_path) == 0) return (vd); - for (int c = 0; c < vd->vdev_children; c++) + for (c = 0; c < vd->vdev_children; c++) if ((mvd = vdev_lookup_by_path(vd->vdev_child[c], path)) != NULL) return (mvd); |