]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: debug: drop unused function p_malloc()
authorWilly Tarreau <w@1wt.eu>
Wed, 27 May 2020 15:10:05 +0000 (17:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:56 +0000 (10:18 +0200)
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.

include/haproxy/debug.h

index f9d0f459cbd580e43010c1feeee122743508ab49..f25680d4b8bb40184e3ae3507f3eb9886aa1fb17 100644 (file)
@@ -22,9 +22,6 @@
 #ifndef _HAPROXY_DEBUG_H
 #define _HAPROXY_DEBUG_H
 
-#include <haproxy/api.h>
-#include <common/memory.h>
-
 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 */