|
From: openocd-gerrit <ope...@us...> - 2023-05-05 22:09:35
|
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 314f4c665f746ebec3be69a8e26f0a671cfdcb46 (commit)
via cd44c6cf83841076b40e7a873285117b7440dd42 (commit)
from 9dc1d90f64168863d350694d38e5ff7f20a57a7e (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 314f4c665f746ebec3be69a8e26f0a671cfdcb46
Author: Antonio Borneo <bor...@gm...>
Date: Sun Apr 9 00:33:38 2023 +0200
rtos: with pointers, use NULL instead of 0
Don't compare pointers with 0, use NULL when needed.
Don't assign pointer to 0, use NULL.
Detected through 'sparse' tool.
Change-Id: Ifa81ba961c0d490cc74880b4a46b620e6358f779
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7598
Tested-by: jenkins
diff --git a/src/rtos/chibios.c b/src/rtos/chibios.c
index 68fe8a14c..20378274e 100644
--- a/src/rtos/chibios.c
+++ b/src/rtos/chibios.c
@@ -80,12 +80,12 @@ struct chibios_params {
static struct chibios_params chibios_params_list[] = {
{
"cortex_m", /* target_name */
- 0,
+ NULL,
NULL, /* stacking_info */
},
{
"hla_target", /* target_name */
- 0,
+ NULL,
NULL, /* stacking_info */
}
};
@@ -198,7 +198,7 @@ static int chibios_update_memory_signature(struct rtos *rtos)
errfree:
/* Error reading the ChibiOS memory structure */
free(signature);
- param->signature = 0;
+ param->signature = NULL;
return -1;
}
@@ -468,7 +468,7 @@ static int chibios_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
return -1;
/* Update stacking if it can only be determined from runtime information */
- if ((param->stacking_info == 0) &&
+ if (!param->stacking_info &&
(chibios_update_stacking(rtos) != ERROR_OK)) {
LOG_ERROR("Failed to determine exact stacking for the target type %s", rtos->target->type->name);
return -1;
commit cd44c6cf83841076b40e7a873285117b7440dd42
Author: Antonio Borneo <bor...@gm...>
Date: Sun Apr 9 00:16:28 2023 +0200
helper: with pointers, use NULL instead of 0
Don't compare pointers with 0, use NULL when needed.
Don't assign pointer to 0, use NULL.
Don't pass 0 ad pointer argument, pass NULL.
Detected through 'sparse' tool.
Change-Id: I3f867cb9c0903f6e396311e7b3970ee5fb3a4231
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7597
Tested-by: jenkins
diff --git a/src/helper/command.c b/src/helper/command.c
index 235bec858..945b890b3 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -582,7 +582,7 @@ int command_run_line(struct command_context *context, char *line)
Jim_DeleteAssocData(interp, "retval");
retcode = Jim_SetAssocData(interp, "retval", NULL, &retval);
if (retcode == JIM_OK) {
- retcode = Jim_Eval_Named(interp, line, 0, 0);
+ retcode = Jim_Eval_Named(interp, line, NULL, 0);
Jim_DeleteAssocData(interp, "retval");
}
diff --git a/src/helper/jep106.c b/src/helper/jep106.c
index d422561bc..62d24a9b2 100644
--- a/src/helper/jep106.c
+++ b/src/helper/jep106.c
@@ -26,7 +26,7 @@ const char *jep106_table_manufacturer(unsigned int bank, unsigned int id)
/* index is zero based */
id--;
- if (bank >= ARRAY_SIZE(jep106) || jep106[bank][id] == 0)
+ if (bank >= ARRAY_SIZE(jep106) || !jep106[bank][id])
return "<unknown>";
return jep106[bank][id];
diff --git a/src/helper/options.c b/src/helper/options.c
index 327c418d0..05cde6709 100644
--- a/src/helper/options.c
+++ b/src/helper/options.c
@@ -39,12 +39,12 @@ static int help_flag, version_flag;
static const struct option long_options[] = {
{"help", no_argument, &help_flag, 1},
{"version", no_argument, &version_flag, 1},
- {"debug", optional_argument, 0, 'd'},
- {"file", required_argument, 0, 'f'},
- {"search", required_argument, 0, 's'},
- {"log_output", required_argument, 0, 'l'},
- {"command", required_argument, 0, 'c'},
- {0, 0, 0, 0}
+ {"debug", optional_argument, NULL, 'd'},
+ {"file", required_argument, NULL, 'f'},
+ {"search", required_argument, NULL, 's'},
+ {"log_output", required_argument, NULL, 'l'},
+ {"command", required_argument, NULL, 'c'},
+ {NULL, 0, NULL, 0}
};
int configuration_output_handler(struct command_context *context, const char *line)
-----------------------------------------------------------------------
Summary of changes:
src/helper/command.c | 2 +-
src/helper/jep106.c | 2 +-
src/helper/options.c | 12 ++++++------
src/rtos/chibios.c | 8 ++++----
4 files changed, 12 insertions(+), 12 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|