summaryrefslogtreecommitdiff
path: root/src/target/xscale.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-24 20:32:10 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-25 10:32:00 -0800
commit4946925bea77a4aace6c310b2b724cf2095c6719 (patch)
tree3f881c5a7125fce193efd20d008e29212ecb29b9 /src/target/xscale.c
parenta3d81eed4d2aac51056f36d7c00ee639bb39c552 (diff)
downloadopenocd_libswd-4946925bea77a4aace6c310b2b724cf2095c6719.tar.gz
openocd_libswd-4946925bea77a4aace6c310b2b724cf2095c6719.tar.bz2
openocd_libswd-4946925bea77a4aace6c310b2b724cf2095c6719.tar.xz
openocd_libswd-4946925bea77a4aace6c310b2b724cf2095c6719.zip
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.c4
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);