|
From: openocd-gerrit <ope...@us...> - 2026-09-06 14:44:55
|
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 70ea3c01b042f6aefd0fe7f92db416c0cec683e3 (commit)
from 0c5906dc9d908264b2ce1159a9d421ccb48fdc57 (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 70ea3c01b042f6aefd0fe7f92db416c0cec683e3
Author: Tomas Vanek <va...@fb...>
Date: Sat Aug 22 11:32:42 2026 +0200
target: change type of working area restore parameter to bool
in both target_free_working_area_restore()
and target_free_all_working_areas_restore()
Change-Id: I04ff9b7e536602fe42c7c4a91bc4454d9b12600f
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9865
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/target/target.c b/src/target/target.c
index 1b747f417..139db2147 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2143,7 +2143,7 @@ static int target_restore_working_area(struct target *target, struct working_are
}
/* Restore the area's backup memory, if any, and return the area to the allocation pool */
-static int target_free_working_area_restore(struct target *target, struct working_area *area, int restore)
+static int target_free_working_area_restore(struct target *target, struct working_area *area, bool restore)
{
if (!area || area->free)
return ERROR_OK;
@@ -2173,13 +2173,13 @@ static int target_free_working_area_restore(struct target *target, struct workin
int target_free_working_area(struct target *target, struct working_area *area)
{
- return target_free_working_area_restore(target, area, 1);
+ return target_free_working_area_restore(target, area, true);
}
/* free resources and restore memory, if restoring memory fails,
* free up resources anyway
*/
-static void target_free_all_working_areas_restore(struct target *target, int restore)
+static void target_free_all_working_areas_restore(struct target *target, bool restore)
{
struct working_area *c = target->working_areas;
@@ -2205,7 +2205,7 @@ static void target_free_all_working_areas_restore(struct target *target, int res
void target_free_all_working_areas(struct target *target)
{
- target_free_all_working_areas_restore(target, 1);
+ target_free_all_working_areas_restore(target, true);
/* Now we have none or only one working area marked as free */
if (target->working_areas) {
@@ -5446,7 +5446,7 @@ COMMAND_HANDLER(handle_target_reset)
/* determine if we should halt or not. */
target->reset_halt = (a != 0);
/* When this happens - all workareas are invalid. */
- target_free_all_working_areas_restore(target, 0);
+ target_free_all_working_areas_restore(target, false);
/* do the assert */
if (n->value == NVP_ASSERT) {
-----------------------------------------------------------------------
Summary of changes:
src/target/target.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|