8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From e902163e484523698f1cc4f06b64830f30909153 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
Date: Sat, 24 Jan 2015 20:41:43 +0100
|
|
Subject: [PATCH 182/506] commands/acpi: Use ALIGN_UP rather than manual
|
|
expression.
|
|
|
|
Improves readability and hopefully automatic scanning.
|
|
|
|
Found by: Coverity Scan.
|
|
---
|
|
grub-core/commands/acpi.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/grub-core/commands/acpi.c b/grub-core/commands/acpi.c
|
|
index 97c2cf2..f66fa2d 100644
|
|
--- a/grub-core/commands/acpi.c
|
|
+++ b/grub-core/commands/acpi.c
|
|
@@ -227,7 +227,7 @@ grub_acpi_create_ebda (void)
|
|
grub_dprintf ("acpi", "Copying rsdpv2 to %p\n", target);
|
|
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;
|
|
}
|
|
@@ -246,7 +246,7 @@ grub_acpi_create_ebda (void)
|
|
grub_dprintf ("acpi", "Copying rsdpv1 to %p\n", target);
|
|
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;
|
|
}
|
|
--
|
|
2.4.3
|
|
|