This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via e3bda57982ed87bd4d5faace5ea669848f3fe556 (commit)
from 492ac453ab6b97280030fe6161dfcac3d84b36ce (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e3bda57982ed87bd4d5faace5ea669848f3fe556
Author: Antonio Borneo <bor...@gm...>
Date: Thu Dec 23 11:05:56 2021 +0100
target: use target_event_name()
We have the API target_event_name().
Use it to improve code readability.
Change-Id: Ic48d2227bdefe9af05aff99a871a45e0612e5254
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/6790
Tested-by: jenkins
diff --git a/src/target/target.c b/src/target/target.c
index e9cbe39b7..7cdd8d830 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -1834,7 +1834,7 @@ int target_call_event_callbacks(struct target *target, enum target_event event)
}
LOG_DEBUG("target event %i (%s) for core %s", event,
- jim_nvp_value2name_simple(nvp_target_event, event)->name,
+ target_event_name(event),
target_name(target));
target_handle_event(target, event);
@@ -4816,7 +4816,7 @@ void target_handle_event(struct target *target, enum target_event e)
target_name(target),
target_type_name(target),
e,
- jim_nvp_value2name_simple(nvp_target_event, e)->name,
+ target_event_name(e),
Jim_GetString(teap->body, NULL));
/* Override current target by the target an event
@@ -4840,7 +4840,7 @@ void target_handle_event(struct target *target, enum target_event e)
if (retval != JIM_OK) {
Jim_MakeErrorMessage(teap->interp);
LOG_USER("Error executing event %s on target %s:\n%s",
- jim_nvp_value2name_simple(nvp_target_event, e)->name,
+ target_event_name(e),
target_name(target),
Jim_GetString(Jim_GetResult(teap->interp), NULL));
/* clean both error code and stacktrace before return */
@@ -5503,9 +5503,9 @@ COMMAND_HANDLER(handle_target_event_list)
command_print(CMD, "------------------------- | "
"----------------------------------------");
while (teap) {
- struct jim_nvp *opt = jim_nvp_value2name_simple(nvp_target_event, teap->event);
command_print(CMD, "%-25s | %s",
- opt->name, Jim_GetString(teap->body, NULL));
+ target_event_name(teap->event),
+ Jim_GetString(teap->body, NULL));
teap = teap->next;
}
command_print(CMD, "***END***");
-----------------------------------------------------------------------
Summary of changes:
src/target/target.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|