diff options
author | Don Brady <[email protected]> | 2017-11-04 14:25:13 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-11-04 13:25:13 -0700 |
commit | 1c27024e22af4386b592b30d40e6a0820ceb48c1 (patch) | |
tree | 689d4b821fd6910a137a0f93351351def5011cec /module/zfs/multilist.c | |
parent | df1f129bc4150fd6ea3f23a01154a71ffa48bf12 (diff) |
Undo c89 workarounds to match with upstream
With PR 5756 the zfs module now supports c99 and the
remaining past c89 workarounds can be undone.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Don Brady <[email protected]>
Closes #6816
Diffstat (limited to 'module/zfs/multilist.c')
-rw-r--r-- | module/zfs/multilist.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/module/zfs/multilist.c b/module/zfs/multilist.c index 40fa1686e..48137b3fc 100644 --- a/module/zfs/multilist.c +++ b/module/zfs/multilist.c @@ -121,11 +121,9 @@ multilist_create(size_t size, size_t offset, void multilist_destroy(multilist_t *ml) { - int i; - ASSERT(multilist_is_empty(ml)); - for (i = 0; i < ml->ml_num_sublists; i++) { + for (int i = 0; i < ml->ml_num_sublists; i++) { multilist_sublist_t *mls = &ml->ml_sublists[i]; ASSERT(list_is_empty(&mls->mls_list)); @@ -243,9 +241,7 @@ multilist_remove(multilist_t *ml, void *obj) int multilist_is_empty(multilist_t *ml) { - int i; - - for (i = 0; i < ml->ml_num_sublists; i++) { + for (int i = 0; i < ml->ml_num_sublists; i++) { multilist_sublist_t *mls = &ml->ml_sublists[i]; /* See comment in multilist_insert(). */ boolean_t need_lock = !MUTEX_HELD(&mls->mls_lock); |