From 70dccc29dad46b5480ea601aec79134de60cf0c4 Mon Sep 17 00:00:00 2001 From: Lephe Date: Sat, 14 Jan 2023 22:27:26 +0100 Subject: [PATCH] style: initialize non-trivially initialized pointer We always have c <= 15 but it's not structural enough that we can outright skip initializing the pointer. --- src/kmalloc/arena_gint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kmalloc/arena_gint.c b/src/kmalloc/arena_gint.c index b037b0a..e6154c4 100644 --- a/src/kmalloc/arena_gint.c +++ b/src/kmalloc/arena_gint.c @@ -259,7 +259,7 @@ static void *gint_malloc(size_t size, void *data) int c = size_class(size); /* Try to find a class that has a free block available */ - block_t *alloc; + block_t *alloc = NULL; for(; c <= 15; c++) { block_t *list = index->classes[c];