diff --git a/wrapper.c b/wrapper.c
index 62edb57338ccd1ae56b86649ec07d88c251576da..8aa9df9b83baddc4a06bbe9e0e5839111edfb29f 100644 (file)
--- a/wrapper.c
+++ b/wrapper.c
static void (*try_to_free_routine)(size_t size) = try_to_free_builtin;
static void (*try_to_free_routine)(size_t size) = try_to_free_builtin;
-void set_try_to_free_routine(void (*routine)(size_t))
+try_to_free_t set_try_to_free_routine(try_to_free_t routine)
{
{
- try_to_free_routine = (routine) ? routine : try_to_free_builtin;
+ try_to_free_t old = try_to_free_routine;
+ try_to_free_routine = routine;
+ return old;
}
char *xstrdup(const char *str)
}
char *xstrdup(const char *str)