From: Willy Tarreau Date: Wed, 27 May 2020 15:10:05 +0000 (+0200) Subject: CLEANUP: debug: drop unused function p_malloc() X-Git-Tag: v2.2-dev9~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=025beea507890f97419ed36887077e4a720b8a78;p=thirdparty%2Fhaproxy.git CLEANUP: debug: drop unused function p_malloc() This one was introduced 5 years ago for debugging and never really used. It is the one which used to cause circular dependencies issues. Let's drop it instead of starting to split the debug include in two. --- diff --git a/include/haproxy/debug.h b/include/haproxy/debug.h index f9d0f459cb..f25680d4b8 100644 --- a/include/haproxy/debug.h +++ b/include/haproxy/debug.h @@ -22,9 +22,6 @@ #ifndef _HAPROXY_DEBUG_H #define _HAPROXY_DEBUG_H -#include -#include - struct task; struct buffer; extern volatile unsigned long threads_to_dump; @@ -34,16 +31,4 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid); void ha_thread_dump_all_to_trash(); void ha_panic(); -/* This one is useful to automatically apply poisonning on an area returned - * by malloc(). Only "p_" is required to make it work, and to define a poison - * byte using -dM. - */ -static inline void *p_malloc(size_t size) -{ - void *ret = malloc(size); - if (mem_poison_byte >= 0 && ret) - memset(ret, mem_poison_byte, size); - return ret; -} - #endif /* _HAPROXY_DEBUG_H */