mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
target: fix retval gaffe in mwX commands
failure to write to memory was not propagated. This is an interesting case of broken error handling: with exceptions we wouldn't have had this at all, and I also wonder if there is a GCC option to warn about these kinds of potential bugs. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
@@ -2378,7 +2378,7 @@ static int target_fill_mem(struct target *target,
|
||||
{
|
||||
current = chunk_size;
|
||||
}
|
||||
int retval = fn(target, address + x * data_size, data_size, current, target_buf);
|
||||
retval = fn(target, address + x * data_size, data_size, current, target_buf);
|
||||
if (retval != ERROR_OK)
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user