summaryrefslogtreecommitdiff
path: root/src/pld
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 22:23:07 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:51:46 -0800
commit5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87 (patch)
tree50cd2c3812b1b585301e66fa4cd1fcc84e357539 /src/pld
parent1df5cc18f51366b823bccdaec4ffa1ee3fac2447 (diff)
downloadopenocd+libswd-5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87.tar.gz
openocd+libswd-5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87.tar.bz2
openocd+libswd-5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87.tar.xz
openocd+libswd-5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87.zip
use CALL_COMMAND_HANDLER instead of direct calls
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or even removed in inherited signatures, without requiring revisiting all of the various call sites.
Diffstat (limited to 'src/pld')
-rw-r--r--src/pld/pld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pld/pld.c b/src/pld/pld.c
index c20b936c..e8cd075e 100644
--- a/src/pld/pld.c
+++ b/src/pld/pld.c
@@ -85,7 +85,8 @@ COMMAND_HANDLER(handle_pld_device_command)
c->driver = pld_drivers[i];
c->next = NULL;
- if (pld_drivers[i]->pld_device_command(cmd_ctx, cmd, args, argc, c) != ERROR_OK)
+ int retval = CALL_COMMAND_HANDLER(pld_drivers[i]->pld_device_command, c);
+ if (ERROR_OK != retval)
{
LOG_ERROR("'%s' driver rejected pld device", args[0]);
free(c);