target: change working area free data type

We only use the struct working_area member 'free' as a
true/false type so might as well use a bool data type.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
Spencer Oliver 2010-12-24 11:17:09 +00:00
parent e8eb5bbc04
commit dc1c5a7500
2 changed files with 3 additions and 3 deletions

View File

@ -1213,7 +1213,7 @@ int target_alloc_working_area_try(struct target *target, uint32_t size, struct w
} }
/* mark as used, and return the new (reused) area */ /* mark as used, and return the new (reused) area */
new_wa->free = 0; new_wa->free = false;
*area = new_wa; *area = new_wa;
/* user pointer */ /* user pointer */
@ -1247,7 +1247,7 @@ static int target_free_working_area_restore(struct target *target, struct workin
return retval; return retval;
} }
area->free = 1; area->free = true;
/* mark user pointer invalid */ /* mark user pointer invalid */
*area->user = NULL; *area->user = NULL;

View File

@ -94,7 +94,7 @@ struct working_area
{ {
uint32_t address; uint32_t address;
uint32_t size; uint32_t size;
int free; bool free;
uint8_t *backup; uint8_t *backup;
struct working_area **user; struct working_area **user;
struct working_area *next; struct working_area *next;