From a0ef7f5826c067db7d582bb6e6ceaf31c4766805 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Feb 2009 16:30:01 -0800 Subject: [PATCH] C90 fixes int declared in for() is a C99 construct --- module/zfs/zio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index d8aaa3fce2..5c60b8c975 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -355,6 +355,7 @@ void zio_add_child(zio_t *pio, zio_t *cio) { zio_link_t *zl = kmem_cache_alloc(zio_link_cache, KM_SLEEP); + int w; /* * Logical I/Os can have logical, gang, or vdev children. @@ -372,7 +373,7 @@ zio_add_child(zio_t *pio, zio_t *cio) ASSERT(pio->io_state[ZIO_WAIT_DONE] == 0); - for (int w = 0; w < ZIO_WAIT_TYPES; w++) + for (w = 0; w < ZIO_WAIT_TYPES; w++) pio->io_children[cio->io_child_type][w] += !cio->io_state[w]; list_insert_head(&pio->io_child_list, zl); @@ -1155,7 +1156,7 @@ zio_reexecute(zio_t *pio) for (cio = zio_walk_children(pio); cio != NULL; cio = cio_next) { cio_next = zio_walk_children(pio); mutex_enter(&pio->io_lock); - for (int w = 0; w < ZIO_WAIT_TYPES; w++) + for (w = 0; w < ZIO_WAIT_TYPES; w++) pio->io_children[cio->io_child_type][w]++; mutex_exit(&pio->io_lock); zio_reexecute(cio);