diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-16 03:29:30 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-16 09:58:11 -0800 |
commit | dc1685ca25567fe75c8d50c825fb0303fbb66fac (patch) | |
tree | e51e63fe1e40d3c60673f57784f88c43277f5eba /src/svf/svf.c | |
parent | 10cce4a5fe85bfd680bc338c900b0033d7174b6a (diff) | |
download | riscv-openocd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.zip riscv-openocd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.tar.gz riscv-openocd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.tar.bz2 |
move ARRAY_SIZE macro to types.h
The ARRAY_SIZE macro was defined in several target files, so move it
to types.h.
This patch also removes two other identical macros: DIM (from jtag.h)
and asizeof (from arm11.h).
Diffstat (limited to 'src/svf/svf.c')
-rw-r--r-- | src/svf/svf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c index 814f3f2..fb5e1b0 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -282,7 +282,7 @@ int svf_add_statemove(tap_state_t state_to) return ERROR_OK; } - for (index = 0; index < DIM(svf_statemoves); index++) + for (index = 0; index < ARRAY_SIZE(svf_statemoves); index++) { if ((svf_statemoves[index].from == state_from) && (svf_statemoves[index].to == state_to)) @@ -783,7 +783,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str) */ command = svf_find_string_in_array(argus[0], - (char **)svf_command_name, DIM(svf_command_name)); + (char **)svf_command_name, ARRAY_SIZE(svf_command_name)); switch (command) { case ENDDR: @@ -1391,7 +1391,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str) } i_tmp = svf_find_string_in_array(argus[1], (char **)svf_trst_mode_name, - DIM(svf_trst_mode_name)); + ARRAY_SIZE(svf_trst_mode_name)); switch (i_tmp) { case TRST_ON: |