From 38c7c94bcd131290dcbae110dfb33b0b78c99d90 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 23 Apr 2022 20:59:04 +0300 Subject: change alignment functions to be type generic --- common/mem_regions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/mem_regions.c b/common/mem_regions.c index e5de0e3..e994b0e 100644 --- a/common/mem_regions.c +++ b/common/mem_regions.c @@ -393,7 +393,7 @@ static void __try_coalesce_regions(struct mem_region_root *r, stat_t free_region(struct mem_region_root *r, vm_t start) { /* addr not aligned to page boundary, corrupted or incorrect pointer */ - if (!aligned(start, BASE_PAGE_SIZE)) + if (!is_aligned(start, BASE_PAGE_SIZE)) return ERR_ALIGN; struct mem_region *m = find_used_region(r, __page(start)); @@ -431,7 +431,7 @@ vm_t map_fill_region(struct vm_branch *b, region_callback_t *mem_handler, /* NULL does pass this check, so technically all NULL pages are * aligned, but they're caught in the while expr so this should * work even if someone tries to map NULL */ - if (!aligned(runner, o_pages)) + if (!is_aligned(runner, o_pages)) continue; while (pages >= o_pages) { -- cgit v1.3