Skip to content

Commit

Permalink
commands/acpi: Use ALIGN_UP rather than manual expression.
Browse files Browse the repository at this point in the history
Improves readability and hopefully automatic scanning.

Found by: Coverity Scan.
  • Loading branch information
phcoder committed Jan 27, 2015
1 parent bd19601 commit 4192f2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grub-core/commands/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ grub_acpi_create_ebda (void)
grub_memcpy (target, v2, v2->length);
v2inebda = target;
target += v2->length;
target = (grub_uint8_t *) ((((grub_addr_t) target - 1) | 0xf) + 1);
target = (grub_uint8_t *) ALIGN_UP((grub_addr_t) target, 16);
v2 = 0;
break;
}
Expand All @@ -282,7 +282,7 @@ grub_acpi_create_ebda (void)
grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
v1inebda = target;
target += sizeof (struct grub_acpi_rsdp_v10);
target = (grub_uint8_t *) ((((grub_addr_t) target - 1) | 0xf) + 1);
target = (grub_uint8_t *) ALIGN_UP((grub_addr_t) target, 16);
v1 = 0;
break;
}
Expand Down

0 comments on commit 4192f2e

Please sign in to comment.