efi: use ROUNDUP() macro instead of open code
PATCH 1/1 efi: use ROUNDUP() macro instead of open code
Signed-off-by Daniel Kiper <[email protected]>
--- xen/common/efi/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/efi/boot.c +1 -1
@@ -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" );
Signature · 7 lines
1.7.10.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 04.12.17 at 11:15, <[email protected]> wrote:
Signed-off-by Daniel Kiper <[email protected]>
Acked-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel