From 13a590ca65f744c8fa55d6e0748cb12f443493f0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 13 Feb 2017 00:12:35 -0500 Subject: sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations --- sim/sh/interp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/sh/interp.c') diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 32618ba..c77cf3b 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -1658,7 +1658,7 @@ init_dsp (struct bfd *abfd) { int i, tmp; - for (i = (sizeof sh_dsp_table / sizeof sh_dsp_table[0]) - 1; i >= 0; i--) + for (i = ARRAY_SIZE (sh_dsp_table) - 1; i >= 0; i--) { tmp = sh_jump_table[0xf000 + i]; sh_jump_table[0xf000 + i] = sh_dsp_table[i]; -- cgit v1.1