]> Pileus Git - ~andy/linux/blobdiff - tools/perf/builtin-kmem.c
perf kmem: use ARRAY_SIZE instead of reinventing it
[~andy/linux] / tools / perf / builtin-kmem.c
index 9fddca749ca2fa541b7f3c247f5567476c296f40..c746108c5d48083f870dd58ddd278364e69e3c6a 100644 (file)
@@ -609,8 +609,7 @@ static struct sort_dimension *avail_sorts[] = {
        &pingpong_sort_dimension,
 };
 
-#define NUM_AVAIL_SORTS        \
-       (int)(sizeof(avail_sorts) / sizeof(struct sort_dimension *))
+#define NUM_AVAIL_SORTS        ((int)ARRAY_SIZE(avail_sorts))
 
 static int sort_dimension__add(const char *tok, struct list_head *list)
 {