aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm7_9_common.c4
-rw-r--r--src/target/feroceon.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 6b1a1731..7f0e3adb 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2576,7 +2576,6 @@ int arm7_9_bulk_write_memory(struct target *target,
{
int retval;
struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
- int i;
if (address % 4 != 0)
return ERROR_TARGET_UNALIGNED_ACCESS;
@@ -2595,8 +2594,7 @@ int arm7_9_bulk_write_memory(struct target *target,
}
/* copy target instructions to target endianness */
- for (i = 0; i < 6; i++)
- target_buffer_set_u32(target, dcc_code_buf + i*4, dcc_code[i]);
+ target_buffer_set_u32_array(target, dcc_code_buf, ARRAY_SIZE(dcc_code), dcc_code);
/* write DCC code to working area, using the non-optimized
* memory write to avoid ending up here again */
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index acaa1b3b..ee0bafd2 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -510,8 +510,7 @@ static int feroceon_bulk_write_memory(struct target *target,
}
/* copy target instructions to target endianness */
- for (i = 0; i < dcc_size/4; i++)
- target_buffer_set_u32(target, dcc_code_buf + i*4, dcc_code[i]);
+ target_buffer_set_u32_array(target, dcc_code_buf, ARRAY_SIZE(dcc_code), dcc_code);
/* write DCC code to working area, using the non-optimized
* memory write to avoid ending up here again */