aboutsummaryrefslogtreecommitdiff
path: root/src/helper/command.h
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2019-06-07 15:31:06 +0200
committerTomas Vanek <vanekt@fbl.cz>2019-12-19 20:43:08 +0000
commit90bd7d148225efa587d8e62017625709a1ac002d (patch)
treea01d0a512fffd7ba7231a14d4798e04b509cf93e /src/helper/command.h
parente8d4074cf859328990f14a6c57a669f741cb83a2 (diff)
helper/command: remove unused field in struct command_registration
The field jim_handler_data in struct command_registration is never assigned, thus has always value NULL. It was added in commit 17a9dea53a71 ("add jim_handler to command_registration") on Nov 23 2009, together with the homonym field jim_handler_data in struct command, but never used since then. Only the field jim_handler_data in struct command is used. Remove the field from struct command_registration and use NULL where it was referenced (or remove the assignment if the recipient is already zero, e.g. allocated with calloc()). Removing the field decreases the total size of OpenOCD binary by only 4944 byte on a 64 bit x86. Not a significant improvement from this point of view. Change-Id: I9f1d281e3de6b2eb398e2d883c5e9ff92628aecd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5225 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/helper/command.h')
-rw-r--r--src/helper/command.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/helper/command.h b/src/helper/command.h
index 733ba42d..672ccd02 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -226,7 +226,6 @@ struct command_registration {
const char *name;
command_handler_t handler;
Jim_CmdProc *jim_handler;
- void *jim_handler_data;
enum command_mode mode;
const char *help;
/** a string listing the options and arguments, required or optional */