mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 15:45:30 +00:00
commands/acpi: Use ALIGN_UP rather than manual expression.
Improves readability and hopefully automatic scanning. Found by: Coverity Scan.
This commit is contained in:
parent
bd196014ec
commit
4192f2e3d1
@ -265,7 +265,7 @@ grub_acpi_create_ebda (void)
|
|||||||
grub_memcpy (target, v2, v2->length);
|
grub_memcpy (target, v2, v2->length);
|
||||||
v2inebda = target;
|
v2inebda = target;
|
||||||
target += v2->length;
|
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;
|
v2 = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ grub_acpi_create_ebda (void)
|
|||||||
grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
|
grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
|
||||||
v1inebda = target;
|
v1inebda = target;
|
||||||
target += sizeof (struct grub_acpi_rsdp_v10);
|
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;
|
v1 = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user