summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:56:49 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:56:49 +0000
commitd3d0f662ef730440e84f5e359f1e4bdc3c505efe (patch)
treeec075bcde41924bc4aedfad4ee3f68125f848880 /src
parent1497e6699ae1757e223d1de3d1642a4978118be6 (diff)
downloadopenocd_libswd-d3d0f662ef730440e84f5e359f1e4bdc3c505efe.tar.gz
openocd_libswd-d3d0f662ef730440e84f5e359f1e4bdc3c505efe.tar.bz2
openocd_libswd-d3d0f662ef730440e84f5e359f1e4bdc3c505efe.tar.xz
openocd_libswd-d3d0f662ef730440e84f5e359f1e4bdc3c505efe.zip
Simplify jtag_add_plain_dr_scan:
- Use jtag_set_error instead of accessing jtag_error directly. - Wrap function arguments to fit everything in 80 columns. - Move retval variable to location of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2121 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/jtag/jtag.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 841083b9..f5d6ac01 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -568,23 +568,19 @@ void jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
jtag_set_error(retval);
}
-
-
/**
- * Duplicate the scan fields passed into the function into a DR SCAN command
- *
- * This function assumes that the caller handles extra fields for bypassed TAPs
- *
+ * Duplicate the scan fields passed into the function into a DR SCAN
+ * command. Unlike jtag_add_dr_scan(), this function assumes that the
+ * caller handles extra fields for bypassed TAPs.
*/
-void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+void jtag_add_plain_dr_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_dr_scan(in_num_fields, in_fields, state);
- if (retval!=ERROR_OK)
- jtag_error=retval;
+ int retval;
+ retval = interface_jtag_add_plain_dr_scan(in_num_fields, in_fields, state);
+ jtag_set_error(retval);
}
void jtag_add_dr_out(jtag_tap_t* tap,