summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomohiro Kusumi <tkusumi@tuxera.com>2017-06-07 23:18:48 +0300
committerJens Axboe <axboe@fb.com>2017-06-07 14:23:26 -0600
commitfdbc9102c79c1a6d4134d5f5b8692658b2cf67ef (patch)
tree833145f075fa4fb9bd52009e5062e5e7ee8a7c10
parent3ed673c6a2f147f2adfbd5bb785ad79c0f4a42ed (diff)
use ARRAY_SIZE() for ignore_error_nr[etype]
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--td_error.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/td_error.c b/td_error.c
index 903f9ea..9d58a31 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)))