diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-16 17:55:49 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-16 17:55:49 -0800 |
commit | c5e00268365045a57354b53c63673990329e6d59 (patch) | |
tree | d944ebbadd5f9f9bb70fbf6c9a81c4c814e89097 /src/target | |
parent | 1d4a09c2ef22dc10ec8a40183b8dd1b1102af20d (diff) | |
download | openocd+libswd-c5e00268365045a57354b53c63673990329e6d59.tar.gz openocd+libswd-c5e00268365045a57354b53c63673990329e6d59.tar.bz2 openocd+libswd-c5e00268365045a57354b53c63673990329e6d59.tar.xz openocd+libswd-c5e00268365045a57354b53c63673990329e6d59.zip |
XScale: fewere exit() calls
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/xscale.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c index 9e93c020..e97e082c 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -585,7 +585,7 @@ static int xscale_send(struct target *target, uint8_t *buffer, int count, int si break; default: LOG_ERROR("BUG: size neither 4, 2 nor 1"); - exit(-1); + return ERROR_INVALID_ARGUMENTS; } jtag_add_dr_out(target->tap, 3, @@ -850,7 +850,7 @@ static int xscale_arch_state(struct target *target) if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC) { LOG_ERROR("BUG: called for a non-ARMv4/5 target"); - exit(-1); + return ERROR_INVALID_ARGUMENTS; } LOG_USER("target halted in %s state due to %s, current mode: %s\n" @@ -1865,8 +1865,8 @@ static int xscale_read_memory(struct target *target, uint32_t address, *buffer++ = buf32[i] & 0xff; break; default: - LOG_ERROR("should never get here"); - exit(-1); + LOG_ERROR("invalid read size"); + return ERROR_INVALID_ARGUMENTS; } } |