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

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

src/jtag/jtag.c

index f5d6ac0118d09b456d072ca239460758aebf189a..b4d0cae89c66d1955a25cb121c778902ddcceb92 100644 (file)
@@ -599,12 +599,7 @@ void jtag_add_dr_out(jtag_tap_t* tap,
 void jtag_add_tlr(void)
 {
        jtag_prelude(TAP_RESET);
-
-       int retval;
-       retval=interface_jtag_add_tlr();
-       if (retval!=ERROR_OK)
-               jtag_error=retval;
-       
+       jtag_set_error(interface_jtag_add_tlr());
        jtag_call_event_callbacks(JTAG_TRST_ASSERTED);
 }