summaryrefslogtreecommitdiff
path: root/src/flash/avrf.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/flash/avrf.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/flash/avrf.c')
-rw-r--r--src/flash/avrf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/avrf.c b/src/flash/avrf.c
index 1c484643..687dd4b5 100644
--- a/src/flash/avrf.c
+++ b/src/flash/avrf.c
@@ -290,7 +290,7 @@ static int avrf_probe(struct flash_bank *bank)
LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
}
- for (i = 0; i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])); i++)
+ for (i = 0; i < (int)ARRAY_SIZE(avft_chips_info); i++)
{
if (avft_chips_info[i].chip_id == EXTRACT_PART(device_id))
{
@@ -369,7 +369,7 @@ static int avrf_info(struct flash_bank *bank, char *buf, int buf_size)
LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
}
- for (i = 0; i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])); i++)
+ for (i = 0; i < (int)ARRAY_SIZE(avft_chips_info); i++)
{
if (avft_chips_info[i].chip_id == EXTRACT_PART(device_id))
{