summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:56:07 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:56:07 +0000
commit4cff9dc0c17df26b9c1908e5382095f044913877 (patch)
treed6cddd9a686182f09dadac6d746ba33a039e9aea /src/jtag/jtag.c
parentf418fcbff06e04a2ddacef0e0e6dcc329a73eb73 (diff)
downloadopenocd_libswd-4cff9dc0c17df26b9c1908e5382095f044913877.tar.gz
openocd_libswd-4cff9dc0c17df26b9c1908e5382095f044913877.tar.bz2
openocd_libswd-4cff9dc0c17df26b9c1908e5382095f044913877.tar.xz
openocd_libswd-4cff9dc0c17df26b9c1908e5382095f044913877.zip
Simplify jtag_execute_queue:
- Add static inline jtag_error_clear helper to return and clear jtag_error. - Use new helper to shrink body of function to two lines. git-svn-id: svn://svn.berlios.de/openocd/trunk@2117 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.c')
-rw-r--r--src/jtag/jtag.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 2caac530..1038aff6 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -914,11 +914,8 @@ int jtag_get_flush_queue_count(void)
int jtag_execute_queue(void)
{
- int retval;
jtag_execute_queue_noclear();
- retval=jtag_error;
- jtag_error=ERROR_OK;
- return retval;
+ return jtag_error_clear();
}
static int jtag_reset_callback(enum jtag_event event, void *priv)