From 169daa11155988a210fac949297381743f3cb400 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 23:14:53 +0100 Subject: feat: clang-tidy fixes --- lib/libc/include/malloc.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libc/include/malloc.h') diff --git a/lib/libc/include/malloc.h b/lib/libc/include/malloc.h index ba2755b0..b7cb0093 100644 --- a/lib/libc/include/malloc.h +++ b/lib/libc/include/malloc.h @@ -1,9 +1,8 @@ #ifndef __LIBC_MALLOC_H #define __LIBC_MALLOC_H -#include -#include #include +#include struct class { uint32_t size; @@ -47,11 +46,12 @@ extern struct page *__malloc_pvec; #define LARGE_PAGE_MASK (~((uintptr_t)LARGE_PAGE_SIZE - 1)) #define SMALL_CLASS(n) \ - { (n * 16), (SMALL_PAGE_SIZE - sizeof(struct page)) / (n * 16) } + { (((n)) * 16), (SMALL_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) } #define MEDIUM_CLASS(n) \ - { (n * 16), (MEDIUM_PAGE_SIZE - sizeof(struct page)) / (n * 16) } + { (((n)) * 16), \ + (MEDIUM_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) } #define LARGE_CLASS(n) \ - { (n * 16), (LARGE_PAGE_SIZE - sizeof(struct page)) / (n * 16) } + { (((n)) * 16), (LARGE_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) } static const struct class global_size_class[] = { SMALL_CLASS(1), SMALL_CLASS(1), SMALL_CLASS(2), -- cgit v1.2.3