diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 20:32:10 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-25 10:32:00 -0800 |
commit | 4946925bea77a4aace6c310b2b724cf2095c6719 (patch) | |
tree | 3f881c5a7125fce193efd20d008e29212ecb29b9 /src/target/xscale.c | |
parent | a3d81eed4d2aac51056f36d7c00ee639bb39c552 (diff) |
use ARRAY_SIZE macro
Search and destroy lingering cases where the ARRAY_SIZE macro should
be used to convey more intrinsic meaning in the OpenOCD code.
Diffstat (limited to 'src/target/xscale.c')
-rw-r--r-- | src/target/xscale.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c index e402a11c..07fcc4c0 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -412,7 +412,7 @@ static int xscale_read_tx(struct target *target, int consume) jtag_add_pathmove(3, path); else { - jtag_add_pathmove(sizeof(noconsume_path)/sizeof(*noconsume_path), noconsume_path); + jtag_add_pathmove(ARRAY_SIZE(noconsume_path), noconsume_path); } jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE)); @@ -2825,7 +2825,7 @@ static void xscale_build_reg_cache(struct target *target) struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache); struct xscale_reg *arch_info = malloc(sizeof(xscale_reg_arch_info)); int i; - int num_regs = sizeof(xscale_reg_arch_info) / sizeof(struct xscale_reg); + int num_regs = ARRAY_SIZE(xscale_reg_arch_info); (*cache_p) = armv4_5_build_reg_cache(target, armv4_5); |