[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] efi: use ROUNDUP() macro instead of open code
Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx> --- xen/common/efi/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 01d3300..469bf98 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -176,7 +176,7 @@ static void __init __maybe_unused *ebmalloc(size_t size) { void *ptr = ebmalloc_mem + ebmalloc_allocated; - ebmalloc_allocated += (size + sizeof(void *) - 1) & ~(sizeof(void *) - 1); + ebmalloc_allocated += ROUNDUP(size, sizeof(void *)); if ( ebmalloc_allocated > sizeof(ebmalloc_mem) ) blexit(L"Out of static memory\r\n"); -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |