mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-07 21:33:54 +00:00
fix(locks): add missing curly braces
This corrects the MISRA violation C2012-15.6: The body of an iteration-statement or a selection-statement shall be a compound-statement. Enclosed statement body within the curly braces. Change-Id: Ie33b310f6406d77a7a2ebd94cf54c2a2968f8644 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
c7b0a28d32
commit
bd7ad5e684
1 changed files with 4 additions and 2 deletions
|
@ -63,8 +63,9 @@ static unsigned int bakery_get_ticket(bakery_lock_t *bakery, unsigned int me)
|
|||
bakery->lock_data[me] = make_bakery_data(CHOOSING_TICKET, my_ticket);
|
||||
for (they = 0U; they < BAKERY_LOCK_MAX_CPUS; they++) {
|
||||
their_ticket = bakery_ticket_number(bakery->lock_data[they]);
|
||||
if (their_ticket > my_ticket)
|
||||
if (their_ticket > my_ticket) {
|
||||
my_ticket = their_ticket;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -108,8 +109,9 @@ void bakery_lock_get(bakery_lock_t *bakery)
|
|||
*/
|
||||
my_prio = bakery_get_priority(my_ticket, me);
|
||||
for (they = 0U; they < BAKERY_LOCK_MAX_CPUS; they++) {
|
||||
if (me == they)
|
||||
if (me == they) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Wait for the contender to get their ticket */
|
||||
do {
|
||||
|
|
Loading…
Add table
Reference in a new issue