From 1153e4833565be35726a673f47b37a6a020d94d7 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 20 Mar 2026 19:32:07 +0700 Subject: [PATCH] bt-dll.c: use REDIR_PTR_INDIR macro for __bound_ptr_add __bound_ptr_add was implemented manually while adjacent __bound_ptr_indir* functions used the REDIR_PTR_INDIR macro. This consolidates the pattern for consistency. --- lib/bt-dll.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/bt-dll.c b/lib/bt-dll.c index 159e9f24..dce26e95 100644 --- a/lib/bt-dll.c +++ b/lib/bt-dll.c @@ -76,16 +76,11 @@ REDIR_WRAP(void, __bt_exit, (rt_context *p), REDIR_WRAP(int, __bt_backtrace, (rt_frame *f, const char *msg), (rt_frame *, const char *), (f, msg)) -void * __bound_ptr_add(void *p, size_t offset) -{ - typedef void *(*fn_t)(void *, size_t); - return ((fn_t)all_ptrs.__bound_ptr_add)(p, offset); -} - #define REDIR_PTR_INDIR(name) \ REDIR_WRAP(void *, name, (void *p, size_t offset), \ (void *, size_t), (p, offset)) +REDIR_PTR_INDIR(__bound_ptr_add) REDIR_PTR_INDIR(__bound_ptr_indir1) REDIR_PTR_INDIR(__bound_ptr_indir2) REDIR_PTR_INDIR(__bound_ptr_indir4)