Browse Source

debug: use assert's when approperiate

error was returned instead of using assert.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
tags/v0.5.0-rc1
Øyvind Harboe 13 years ago
parent
commit
676f48d77d
2 changed files with 2 additions and 4 deletions
  1. +1
    -2
      src/target/arm_jtag.h
  2. +1
    -2
      src/target/xscale.c

+ 1
- 2
src/target/arm_jtag.h View File

@@ -45,8 +45,7 @@ static inline int arm_jtag_set_instr(struct arm_jtag *jtag_info,
/* inline most common code path */
struct jtag_tap *tap;
tap = jtag_info->tap;
if (tap == NULL)
return ERROR_FAIL;
assert (tap != NULL);

if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{


+ 1
- 2
src/target/xscale.c View File

@@ -160,8 +160,7 @@ static int xscale_verify_pointer(struct command_context *cmd_ctx,

static int xscale_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end_state)
{
if (tap == NULL)
return ERROR_FAIL;
assert (tap != NULL);

if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{


Loading…
Cancel
Save