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>
{
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;