zpool: main: use ARRAY_SIZE(class_name) instead of 3
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13125
This commit is contained in:
parent
f4826a2d46
commit
cf5a9d8c39
|
@ -4688,7 +4688,7 @@ print_iostat_default(vdev_stat_t *vs, iostat_cbdata_t *cb, double scale)
|
||||||
format, column_width, cb->cb_scripted);
|
format, column_width, cb->cb_scripted);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *class_name[] = {
|
static const char *const class_name[] = {
|
||||||
VDEV_ALLOC_BIAS_DEDUP,
|
VDEV_ALLOC_BIAS_DEDUP,
|
||||||
VDEV_ALLOC_BIAS_SPECIAL,
|
VDEV_ALLOC_BIAS_SPECIAL,
|
||||||
VDEV_ALLOC_CLASS_LOGS
|
VDEV_ALLOC_CLASS_LOGS
|
||||||
|
@ -4857,7 +4857,7 @@ children:
|
||||||
/*
|
/*
|
||||||
* print all other top-level devices
|
* print all other top-level devices
|
||||||
*/
|
*/
|
||||||
for (uint_t n = 0; n < 3; n++) {
|
for (uint_t n = 0; n < ARRAY_SIZE(class_name); n++) {
|
||||||
boolean_t printed = B_FALSE;
|
boolean_t printed = B_FALSE;
|
||||||
|
|
||||||
for (c = 0; c < children; c++) {
|
for (c = 0; c < children; c++) {
|
||||||
|
@ -6220,7 +6220,7 @@ print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* list the classes: 'logs', 'dedup', and 'special' */
|
/* list the classes: 'logs', 'dedup', and 'special' */
|
||||||
for (uint_t n = 0; n < 3; n++) {
|
for (uint_t n = 0; n < ARRAY_SIZE(class_name); n++) {
|
||||||
boolean_t printed = B_FALSE;
|
boolean_t printed = B_FALSE;
|
||||||
|
|
||||||
for (c = 0; c < children; c++) {
|
for (c = 0; c < children; c++) {
|
||||||
|
|
Loading…
Reference in New Issue