aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-10-07 18:19:37 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-08 10:50:27 +0100
commitf60c265159e832ae389f3ab1acf9343d9e86a19a (patch)
tree86cd04729d3ca3a440cccb2e2d997cccaa4f838b /drivers/staging/speakup
parentstaging: rdma: amso1100: remove label indentation (diff)
downloadlinux-dev-f60c265159e832ae389f3ab1acf9343d9e86a19a.tar.xz
linux-dev-f60c265159e832ae389f3ab1acf9343d9e86a19a.zip
Staging: speakup: Use ARRAY_SIZE macro
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. Changes made using Coccinelle- @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r--drivers/staging/speakup/i18n.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c
index f061747546a6..12f880ed4ddf 100644
--- a/drivers/staging/speakup/i18n.c
+++ b/drivers/staging/speakup/i18n.c
@@ -389,7 +389,7 @@ static struct msg_group_t all_groups[] = {
},
};
-static const int num_groups = sizeof(all_groups) / sizeof(struct msg_group_t);
+static const int num_groups = ARRAY_SIZE(all_groups);
char *spk_msg_get(enum msg_index_t index)
{