debug: use assert's when approperiate
authorØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 11 Aug 2010 09:00:02 +0000 (11:00 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 11 Aug 2010 09:01:14 +0000 (11:01 +0200)
error was returned instead of using assert.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/target/arm_jtag.h
src/target/xscale.c

index 37c228f8e12bad3947604005bcbedaf7d96589a5..f581278180d75335aaec2d19cc51e0888a960250 100644 (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)
        {
index c0080b2b388c7c1b3d80e6ca0e7942e6c3e4dae5..44358bc3f3bb246a51cfa7a591fd63520f93c8af 100644 (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)
        {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)