]> git.sur5r.net Git - openocd/commitdiff
Simplify jtag_add_runtest:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 8 Jun 2009 10:57:39 +0000 (10:57 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 8 Jun 2009 10:57:39 +0000 (10:57 +0000)
- Use jtag_set_error instead of accessing jtag_error directly.
- Eliminate superfluous comment and temporary variable.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2124 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index b118b0ceb225488ad170ef0dde3e22d84e00d4f6..4e6f269bee646c8fda2433028e33961b2284326c 100644 (file)
@@ -640,14 +640,8 @@ void jtag_add_pathmove(int num_states, const tap_state_t *path)
 
 void jtag_add_runtest(int num_cycles, tap_state_t state)
 {
-       int retval;
-
        jtag_prelude(state);
-
-       /* executed by sw or hw fifo */
-       retval=interface_jtag_add_runtest(num_cycles, state);
-       if (retval!=ERROR_OK)
-               jtag_error=retval;
+       jtag_set_error(interface_jtag_add_runtest(num_cycles, state));
 }