|
From: openocd-gerrit <ope...@us...> - 2024-01-13 14:43:15
|
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 5e1468da186e65029316a359493e2d2353e21512 (commit)
from 6e6d486de2c668e14f9534fab820eea305826753 (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 5e1468da186e65029316a359493e2d2353e21512
Author: Antonio Borneo <bor...@gm...>
Date: Sun Aug 6 10:40:03 2023 +0200
helper/command: drop unused variables
In both functions script_debug() and script_command_args_alloc()
the variable len is never used, and Jim_GetString() does not
mandate it.
Drop the variable and pass NULL to Jim_GetString().
Change-Id: I754b27a59c6087cde729496be42609d2a7145b0c
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8053
Tested-by: jenkins
diff --git a/src/helper/command.c b/src/helper/command.c
index ef50ab5bd..96023336c 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -145,8 +145,7 @@ static void script_debug(Jim_Interp *interp, unsigned int argc, Jim_Obj * const
char *dbg = alloc_printf("command -");
for (unsigned i = 0; i < argc; i++) {
- int len;
- const char *w = Jim_GetString(argv[i], &len);
+ const char *w = Jim_GetString(argv[i], NULL);
char *t = alloc_printf("%s %s", dbg, w);
free(dbg);
dbg = t;
@@ -171,8 +170,7 @@ static char **script_command_args_alloc(
unsigned i;
for (i = 0; i < argc; i++) {
- int len;
- const char *w = Jim_GetString(argv[i], &len);
+ const char *w = Jim_GetString(argv[i], NULL);
words[i] = strdup(w);
if (!words[i]) {
script_command_args_free(words, i);
-----------------------------------------------------------------------
Summary of changes:
src/helper/command.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|