From: Tomohiro Kusumi Date: Wed, 7 Jun 2017 20:18:48 +0000 (+0300) Subject: use ARRAY_SIZE() for ignore_error_nr[etype] X-Git-Tag: fio-2.21~14 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=fdbc9102c79c1a6d4134d5f5b8692658b2cf67ef use ARRAY_SIZE() for ignore_error_nr[etype] Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/td_error.c b/td_error.c index 903f9ea5..9d58a314 100644 --- a/td_error.c +++ b/td_error.c @@ -20,8 +20,7 @@ int td_non_fatal_error(struct thread_data *td, enum error_type_bit etype, if (!td->o.ignore_error[etype]) { td->o.ignore_error[etype] = __NON_FATAL_ERR; - td->o.ignore_error_nr[etype] = sizeof(__NON_FATAL_ERR) - / sizeof(int); + td->o.ignore_error_nr[etype] = ARRAY_SIZE(__NON_FATAL_ERR); } if (!(td->o.continue_on_error & (1 << etype)))