summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:56:25 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:56:25 +0000
commite3b1937aaf6c7c38a3310095c82dc9ab717416f1 (patch)
tree5be15cc1cd686dafbc5142bdac496aa524015cef
parent9bdbe70ceb5e3e028f0464e53a5f9977d7719ec3 (diff)
downloadopenocd_libswd-e3b1937aaf6c7c38a3310095c82dc9ab717416f1.tar.gz
openocd_libswd-e3b1937aaf6c7c38a3310095c82dc9ab717416f1.tar.bz2
openocd_libswd-e3b1937aaf6c7c38a3310095c82dc9ab717416f1.tar.xz
openocd_libswd-e3b1937aaf6c7c38a3310095c82dc9ab717416f1.zip
Simplify jtag_add_plain_ir_scan:
- Use jtag_set_error instead of accessing jtag_error directly. - Wrap function arguments to fit everything in 80 columns. git-svn-id: svn://svn.berlios.de/openocd/trunk@2119 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/jtag.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 41b1ab38..f8a2da91 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -474,15 +474,14 @@ void jtag_add_ir_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t st
* This function assumes that the caller handles extra fields for bypassed TAPs
*
*/
-void jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+void jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields,
+ tap_state_t state)
{
- int retval;
-
jtag_prelude(state);
- retval=interface_jtag_add_plain_ir_scan(in_num_fields, in_fields, state);
- if (retval!=ERROR_OK)
- jtag_error=retval;
+ int retval = interface_jtag_add_plain_ir_scan(
+ in_num_fields, in_fields, state);
+ jtag_set_error(retval);
}
void jtag_add_callback(jtag_callback1_t f, u8 *in)